Skip to content
Snippets Groups Projects
Commit 7f7d4e66 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Completely trivial changes from review of last PR

parent 5ec7ac21
No related branches found
No related tags found
No related merge requests found
......@@ -886,5 +886,4 @@ config CAN_TSEG2
The number of CAN time quanta in segment 2. Default: 7
endmenu
endif # ARCH_CHIP_STM32L4
......@@ -59,7 +59,6 @@
#include "up_internal.h"
#include "up_arch.h"
#include "chip.h"
#include "stm32l4.h"
#include "stm32l4_can.h"
......@@ -69,6 +68,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Delays *******************************************************************/
/* Time out for INAK bit */
......@@ -313,7 +313,6 @@ static uint32_t can_getfreg(struct stm32l4_can_s *priv, int offset)
#ifdef CONFIG_CAN_REGDEBUG
static void can_vputreg(uint32_t addr, uint32_t value)
{
/* Show the register value being written */
lldbg("%08x<-%08x\n", addr, value);
......@@ -592,6 +591,7 @@ static int can_setup(FAR struct can_dev_s *dev)
canlldbg("CAN%d filter initialization failed: %d\n", priv->port, ret);
return ret;
}
can_dumpfiltregs(priv, "After filter initialization");
/* Attach the CAN RX FIFO 0 interrupt and TX interrupts. The others are not used */
......@@ -688,6 +688,7 @@ static void can_rxint(FAR struct can_dev_s *dev, bool enable)
{
regval &= ~CAN_IER_FMPIE0;
}
can_putreg(priv, STM32L4_CAN_IER_OFFSET, regval);
}
......@@ -880,6 +881,7 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg)
}
}
}
can_putreg(priv, STM32L4_CAN_TDLR_OFFSET(txmb), regval);
regval = 0;
......@@ -906,6 +908,7 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg)
}
}
}
can_putreg(priv, STM32L4_CAN_TDHR_OFFSET(txmb), regval);
/* Enable the transmit mailbox empty interrupt (may already be enabled) */
......@@ -952,6 +955,7 @@ static bool can_txready(FAR struct can_dev_s *dev)
{
return true;
}
return false;
}
......@@ -987,6 +991,7 @@ static bool can_txempty(FAR struct can_dev_s *dev)
{
return true;
}
return false;
}
......@@ -1288,6 +1293,7 @@ static int can_bittiming(struct stm32l4_can_s *priv)
ts1 = (tmp - 1) >> 1;
ts2 = tmp - ts1 - 1;
if (ts1 == ts2 && ts1 > 1 && ts2 < CAN_BTR_TSEG2_MAX)
{
ts1--;
......@@ -1439,6 +1445,7 @@ static int can_cellinit(struct stm32l4_can_s *priv)
canlldbg("ERROR: Timed out waiting to exit initialization mode: %08x\n", regval);
return -ETIMEDOUT;
}
return OK;
}
......@@ -1589,4 +1596,3 @@ FAR struct can_dev_s *stm32l4_caninitialize(int port)
}
#endif /* CONFIG_CAN && (CONFIG_STM32L4_CAN1 || CONFIG_STM32L4_CAN2) */
......@@ -54,6 +54,7 @@
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Configuration ********************************************************************/
/* Up to 1 CAN interfaces are supported */
......
......@@ -58,7 +58,7 @@ Common Board Features:
provide a ST-Link for programming, debug similar to the
OpenOcd FTDI function - USB to JTAG front-end.
Expansion I/F ST Zio and Extended Ardino and Morpho Headers
Expansion I/F: ST Zio and Extended Ardino and Morpho Headers
Nucleo F746ZG
=============
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment