cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX CAN Config Fails in 4.24

Richard Lowe
Senior III
Posted on January 27, 2018 at 08:21

Using an STM32L4xx MCU in CubeMX. Enable the CAN peripheral. Go to configuration and click CAN1 ->

0690X00000609THQAY.png

You'll notice that no dialog box ever appears.

Same with migrating an STM32L4xx based project to the new 1.11 framework. PC CPU stays at about 50% usage and stays there for infinite time ( Well, I only let it run for 7 hours, so.... )

1 ACCEPTED SOLUTION

Accepted Solutions
stm32cube-t
Senior III
Posted on February 21, 2018 at 10:15

Sorry for the inconvenience. This problem will be solved in next STM32CubeMX 4.25 release coming out in few weeks from now.

View solution in original post

8 REPLIES 8
hendrikk
Associate III
Posted on January 29, 2018 at 17:30

https://community.st.com/0D70X000006Sw4SSAS

Abdelmalek BELLOULA
Associate III
Posted on January 29, 2018 at 19:54

For the problem of migrating programs to the new version STM32CubeMX 4.24.0, I think that the problem is in the change of the names of the structures in the file stm32l4xx_hal_can.h of the new STM32cube_L4_V1.11.0:

in stm32l4xx_hal_can.h 

CanRxMsgTypeDef;  changed to CAN_RxHeaderTypeDef;

CanTxMsgTypeDef; changed to  CAN_TxHeaderTypeDef;

CAN_FilterConfTypeDef; changed to CAN_FilterTypeDef;

it is not only the names that have changed but even the parameters of the structures have changed too

I think it is necessary to write again the code for the part CAN because the file stm32l4xx_hal_can.c to completely changed in the new version

Imen.D
ST Employee
Posted on January 29, 2018 at 20:23

Hello,

Thank your for your reported issue. 

We will forward your issue to CubeMx team and keep you informed about the taken actions.

Kind Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on January 29, 2018 at 20:25

Hello Abdelmalek,

You are right, let me comment this shortly. 

Recently ST developed from scratch a completely new CAN HAL driver. The new HAL CAN driver has been introduced to bypass limitations in old version. Latest CubeL4 (v.1.11.0) already provides this new driver. New driver means also new API: C structures and functions.

New driver is located in Drivers/STM32xxxx_HAL_Driver/Src and Drivers/STM32xxxx_HAL_Driver/Inc folders. It can be enabled through switch HAL_CAN_MODULE_ENABLED in stm32l4xx_hal_conf.h.

The legacy HAL CAN driver is also present in the latest CubeL4 in Drivers/STM32L4xx_HAL_Driver/Src/Legacy and Drivers/STM32L4xx_HAL_Driver/Inc/Legacy folders for software compatibility reasons. If user want to use legacy driver, it can be enabled through switch HAL_CAN_LEGACY_MODULE_ENABLED in stm32l4xx_hal_conf.h.

Regards

Szymon

Posted on January 29, 2018 at 20:35

thank you for your reply

Posted on January 29, 2018 at 20:52

thank you for your reply

Posted on February 15, 2018 at 10:04

Appreciate the action Imen. Curious if you've heard a ETA on this issue? Seems like a pretty severe issue, it is in my case. 

stm32cube-t
Senior III
Posted on February 21, 2018 at 10:15

Sorry for the inconvenience. This problem will be solved in next STM32CubeMX 4.25 release coming out in few weeks from now.