I realize CRC is not officially supported, but hoping to gain some insight here if any authors watch the forums.
I am looking to use CRC in an STM32L4 project. I see that the L4xx/stm32_rcc.h in mainline ChibiOS is missing the Enable/Disable/ResetCRC family of functions that the F0/3/4/7 files contain.
I am wondering how this is supposed to fit together. The F0/3/4/7 Enable/Disable macros take the 'lp' argument. However, the community hal_lld_crc.c calls it without any argument. This works for the community/testhal/crc demo for the F0xx series, since lp is ignored anyway. I'm not sure what needs to be added and where to port to L4.
Any insight would be appreciated.
STM32Lxx and community CRC driver
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32Lxx and community CRC driver
Hi,
Community drivers are not necessarily updated or maintained for each ChibiOS version. The trunk RCC macros do not have that parameter, probably the driver is following the trunk code. You may simply add "false" if you are using an older ChibiOS version.
Giovanni
Community drivers are not necessarily updated or maintained for each ChibiOS version. The trunk RCC macros do not have that parameter, probably the driver is following the trunk code. You may simply add "false" if you are using an older ChibiOS version.
Giovanni
Re: STM32Lxx and community CRC driver
I still see the 'lp' parameter in the trunk r12399
https://sourceforge.net/p/chibios/svn2/ ... rcc.h#l906
https://sourceforge.net/p/chibios/svn2/ ... cc.h#l1574
Etc..
I'm not sure how the crc demo for the F0 compiles, since it passes no argument to 'rccEnableCrc()', and the underlying macro would be called as
rccEnableAHB(RCC_AHBENR_CRCEN, );
Maybe the trailing comma is ok when the 'lp' parm isn't used? This wouldn't be the case in the F4 since it does actually switch on the 'lp' parameter.
https://sourceforge.net/p/chibios/svn2/ ... rcc.h#l906
https://sourceforge.net/p/chibios/svn2/ ... cc.h#l1574
Etc..
I'm not sure how the crc demo for the F0 compiles, since it passes no argument to 'rccEnableCrc()', and the underlying macro would be called as
rccEnableAHB(RCC_AHBENR_CRCEN, );
Maybe the trailing comma is ok when the 'lp' parm isn't used? This wouldn't be the case in the F4 since it does actually switch on the 'lp' parameter.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32Lxx and community CRC driver
The lp parameter has been removed from the "disable" macros only.
Giovanni
Giovanni
Who is online
Users browsing this forum: No registered users and 52 guests