How can I include HAL Legacy Can drivers instead of the updated HAL CAN Driver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-11-15 06:10 AM
I inherited a Keil Project which used the HAL Legacy CAN driver, and so I'm trying to port this system to SW4STM32, however, when I generate/regenerate a new project with the STM32Cube Generator, the CAN driver is replaced.
Normally this wouldn't be an issue, except we heavily use the CAN structures, which no longer exist, so it would be quite an impediment to need to upgrade the CAN driver just to move out of the Keil Ecosystem. Are there any suggestions or work arounds so that I can continue using the Legacy CAN driver with STM32Cube.
- Labels:
-
CAN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-11-15 06:42 AM
Hello @alex.shirley ,
The legacy HAL CAN driver is present in the release in Drivers/STM32XXxx_HAL_Driver/Src/Legacy and Drivers/STM32XXxx_HAL_Driver/Inc/Legacy folders for software compatibility reasons.
Its usage is not recommended as deprecated. It can however be enabled through switch HAL_CAN_LEGACY_MODULE_ENABLED in stm32XXxx_hal_conf.h
Kind Regards,
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-11-15 07:10 AM
In the stm32F4xx_hal_conf.h that's generated by CubeMX, there is no switch for using legacy drivers. I tried to add the include to the system, but when the program was later regenerated, the defines disappeared.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-11-16 01:15 AM
@Imen DAHMEN Alternatively, is there an older version of CubeMX and stm32_fw_f4 that uses the older CAN driver? Where can I find the change log with regards to the CAN driver, so I know which version of generator software to use?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-11-19 02:17 AM
Hello @alex.shirley ,
You can find older versions of STM32CubeMX in this discussion:
Kind Regards,
Imen
Thanks
Imen