Commit Graph

36 Commits (58c2760e3f43ac56508c52438e081448b46241f1)

Author SHA1 Message Date
jeromecoutant 433ba46132 TARGET_STM astyle 2018-06-27 14:21:07 +02:00
bcostm d96e76e7bd STM32 CAN: fix wrong ID and MASK filter 2018-01-05 10:11:17 +01:00
Martin Kojtal cee180f472
Merge pull request #5667 from productize/fix-stm32-can3
STM32: Fix CAN3
2017-12-12 17:39:41 +00:00
Adam Heinrich 9ee222a8e6 STM32: Set valid filter number for CAN3
Filter numbers 14 to 27 are reserved for dual CAN configuration.
However, CAN3 operates in single CAN configuration according to the
reference manual).
2017-12-07 18:06:05 +01:00
bcostm bfc4d68ae0 STM32 CAN3: remove test of CAN_2 and CAN_3
CAN_2 and CAN_3 are enum and not #define and this causes compilation error with GCC_ARM

Instead put back the test of CAN_NUM (which are defined in can_device.h).
2017-12-07 18:04:34 +01:00
Adam Heinrich d33c0a6fa5 STM32: Pass correct id to can_irq() for CAN3 2017-12-06 19:41:20 +01:00
Mathieu Garivet 6ee3d80b1c Fix RTR position bit in TX mailbox register 2017-11-28 18:44:28 +01:00
bcostm 2d8d8ae9e1 STM32: fix error with CAN_3 not defined 2017-11-15 10:36:03 +01:00
bcostm 0ef4e2881c STM32: Add support of CAN3 on STM32F413/F767 2017-11-14 09:48:02 +01:00
Laurent MEUNIER 04ac65a4e6 STM32: CAN: restore registers after can_reset
After reset the MCR register content needs to be restored so we're
introducing the can_registers_init function to be called at the first
init stage, but also after reset. We also store the can frequency to
go through the initialisation phase again.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 8357f6fe77 STM32: CAN: store the mode in object context
In order to apply the same mode in case of reset, we store the current
requested mode in the HAL structure.

To make storage in a single place, we also change can_monitor to call
can_mode function as they actually acting on same registers.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 57222b604f STM32: CAN: do not overwite BTR register when setting frequency
BTR register has other bits than the ones calculated and set through
the can_speed function, so let's take care to only write to the
right registers.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 759642af8e STM32: Define CAN handle as part of can object
Instead of a static object, this will make driver
instantiation more robust and allow to re-use init
configuration on a need basis.

The CANName struct member is actually the CAN registers base address,
which is now available in the CanHandle.Instance field, so we don't need
CANName anymore.
2017-09-05 10:27:21 +02:00
bcostm cef5133092 STM32 CAN: Fix issue with speed function calculation 2017-07-24 16:35:39 +02:00
Brad Perry f7d76b5d29 Fixing the problem where the CAN is initialized to the wrong frequency at startup regardless of the value set in the constructor. Issue #3863 2017-06-28 12:07:14 -07:00
adustm 6770678811 Fix another typo 2017-05-29 10:24:03 +02:00
adustm 795bfd2288 Fix coding style 2017-05-29 10:24:03 +02:00
adustm b99ccf65bd Add timeout also on the 1st while loop 2017-05-29 10:24:03 +02:00
adustm 9a1d05551b Optimize the use of the status value 2017-05-29 10:24:03 +02:00
adustm 52d38a1be0 Handle can_frequency sync error
add a timeout + return an error message
2017-05-29 10:24:03 +02:00
adustm 577a0d972b STM targets: the free irq function was not well implemented
the index of the table was out of range
2017-05-15 14:27:22 +02:00
adustm 9115dd9b98 Add can_init_freq for STM devices 2017-05-15 14:27:22 +02:00
Simon Vogl 1c4e0d7dcb can_write(): return error code when no tx mailboxes are available. (#3829) 2017-03-09 15:42:00 +00:00
Martin Kojtal 6aa62c1956 Merge pull request #3828 from jeromecoutant/PR_CAN_TYPE
STM32 CAN API: correct format and type
2017-03-09 15:40:01 +00:00
jeromecoutant 67a75d96c6 STM32 CAN API: correct format and type
astyle done
2017-03-06 11:34:20 +01:00
adustm 18c1618637 DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated 2017-03-03 17:05:28 +01:00
bcostm 30565cbe5e Revert "Coding style"
This reverts commit 32b801b40c.
2017-02-20 11:29:30 +01:00
bcostm 32b801b40c Coding style 2017-02-20 11:19:53 +01:00
bcostm eec6e10138 Add a #else to cover default STM32 devices for the IRQHandler functions.
Change also the coding style for the "{".
2017-02-20 11:19:53 +01:00
bcostm f527ff95ab Add support to L4 targets. 2017-02-20 11:19:53 +01:00
bcostm caef97c5e6 Add support to F7 targets. 2017-02-20 11:19:53 +01:00
bcostm 0c4688e7e8 Add support to F4 targets. 2017-02-20 11:19:53 +01:00
bcostm b6b21672e8 Add F3 differences. 2017-02-20 11:19:53 +01:00
bcostm 1f47619e82 Add F2 differences. Mainly add support for CAN2 instance. 2017-02-20 11:19:53 +01:00
bcostm 311648ab6c Add F1 differences.
Create can_device.h files to define specific code for the STM32 family
2017-02-20 11:19:53 +01:00
bcostm 45c7e0dca9 Initial commit: copy can_api.c from F0 target 2017-02-20 11:19:53 +01:00