2018-02-01 12:39 PM
Hello!
The HAL CAN driver for the STM32F4 got reworked lately (december 2017). I try to port my code from the old to the new drivers (compatibility break). There is a brief driver description in the update history but it would be also very helpful to get some example code to speed up porting ;-). I did look up the Cube STM32F4 sample codes but it seems all the CAN samples got deleted (not yet developed?).... Also the HAL description is still version 5 and the new API is not yet worked in. Correct, or did I miss anything?
Cheers, Stefan
Solved! Go to Solution.
2018-02-01 01:03 PM
Hello Stefan,
This is correct that HAL CAN driver has been redesigned with new API.
Please find below a short migration guide:
More complete 'how to use the new driver' is detailed in the driver header section itself.
Regards
Szymon
2018-02-01 01:03 PM
Hello Stefan,
This is correct that HAL CAN driver has been redesigned with new API.
Please find below a short migration guide:
More complete 'how to use the new driver' is detailed in the driver header section itself.
Regards
Szymon
2018-02-01 11:41 PM
Thank you Szymon! Yes I saw these explanations in the comments to the driver description. And I use it ;-). However I do not have that much experience with the CAN bus and would like to have a look at some sample code to find my way around...
Cheers Stefan
update: examples can be found here: C:\....STM32Cube\Repository\STM32Cube_FW_F4_V1.19.0\Projects\STM32446E_EVAL\Examples\CAN\CAN_Loopback\Src
2018-02-02 11:21 AM
Good day!
Will it be possible in the new version of the implementation of working with SAN to determine which of the filters triggered the interrupt?
2018-02-20 01:50 PM
I found a CAN_Networking example under the following path:
STM32Cube_FW_F4_V1.0\Projects\STM324xG_EVAL\Examples\CAN\CAN_Networking
Panecki.Szymon.002
- thx for your short nice migration guide!2018-03-22 06:03 PM
Hi
I have recently updated to new CAN driver and I found it useful for few things which were not as easy to do with the older version. I however am not entirely clear on the Rx mechanism:
Does Rx always start with RxFifo 0 by default or is there anyway to change this at init or during runtime?
Is it possible to ping pong between RxFifo 0 and RxFifo 1 in runtime?
Thanks
Rashmy
2018-06-25 07:42 AM
Hello Szymon,
I would like to implement CAN Bus Communication on my STM32F767ZI Nucleo Board. I looked around to find some example codes and the result was always the same example shared in this post by Stefan Meyre. As you mentioned, the problem is that the new HAL Driver for CAN has different functions from the previous version. So I was wondering if you or some other St guy are working on some example code with the functions from the new HAL CAN driver. It would be very useful to share it as a starting point for CAN code implementation.
Thank you.
PS: I am aware of the presentation you made about STM32F7xxx CAN implementation, but also in this pdf the example is implemented with the old HAL CAN Driver version
Regards
Francesco
2018-06-25 10:19 AM
Hi
Francesco,
Thanks for contacting me and asking.
Recently I prepared for one of customers presentation, which guides how to develop a simple CAN application with new API and how to migrate from old API to new API. Please find it attached. For purpose of this presentation I used STM32L4, however approach used for STM32F7 should be the same.
Good luck with your STM32 CAN project!
Regards
Szymon
________________ Attachments : STM32L4 CAN new API and migration.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxTW&d=%2Fa%2F0X0000000ayX%2F88jLLXCT3K5cAKBDLIwfRvrqV8wrr5Rvq0_amyQl1dk&asPdf=false2018-06-25 03:26 PM
Dear Szymon,
this is exactly what I was looking for. It may seem simple for an embedded system designer to migrate from an old driver to a new one, but for people like me (mechanical engineer) that want to use these boards for their projects, tutorials and starting guide are very important. I am appreciating the growing St community, and the availability of the people like you who help 'newbies' like me sharing their knowledge with them. Well done. I will try your example as soon as possible.
Regards
Francesco
2018-06-25 03:56 PM
Thanks for your feedback and for kind words. I am very glad to hear that this material will be helpful to you.
Regards
Szymon