2018-06-03 11:04 PM
Hello,
I am trying to implement a canbus example. I was used can example with no problem in the CubeMX Version 4.24. Now, I have updated the CubeMX to version 4.25.1. Can exampel is not working now. There are some changes between version. Can someone explain me Why ?
In the newer version there is no
pTxMsg
andpRxMsg
buffers. How can I send and receive data via newer version of the CubeMx.
Is there an example for the newer version of the CubeMx ?
NEW
typedef struct __CAN_HandleTypeDef
{ CAN_TypeDef *Instance; /*!< Register base address */CAN_InitTypeDef Init; /*!< CAN required parameters */
__IO HAL_CAN_StateTypeDef State; /*!< CAN communication state */
__IO uint32_t ErrorCode; /*!< CAN Error code.
This parameter can be a value of @ref CAN_Error_Code */} CAN_HandleTypeDef;
OLD
typedef struct
{ CAN_TypeDef *Instance; /*!< Register base address */CAN_InitTypeDef Init; /*!< CAN required parameters */
CanTxMsgTypeDef* pTxMsg; /*!< Pointer to transmit structure */
CanRxMsgTypeDef* pRxMsg; /*!< Pointer to reception structure for RX FIFO0 msg */
CanRxMsgTypeDef* pRx1Msg; /*!< Pointer to reception structure for RX FIFO1 msg */
__IO HAL_CAN_StateTypeDef State; /*!< CAN communication state */
HAL_LockTypeDef Lock; /*!< CAN locking object */
__IO uint32_t ErrorCode; /*!< CAN Error code */
}CAN_HandleTypeDef;
#stm32-stm32cube #cubemx-4.25.1 #canbusSolved! Go to Solution.
2018-06-26 03:48 AM
Hello
kavak.engin
Please find in this discssion
https://community.st.com/0D50X00009Xkg2MSAR
,a new presentation created by
Panecki.Szymon.002
,which guides you to develop a simple CAN application with new API and how to migrate from old API to new API.
With Regards,
Imen
2018-06-04 12:25 AM
Hi
kavak.engin
Your request is reported to our CubeMX team. One of our experts will answer you ASAP.
Khouloud.
2018-06-07 04:27 AM
Hi
kavak.engin
,Thanks for your feedback.
Effectively the CAN Driver has changed compared to the lastest version, you can find the new example in STM32CubeF4 1.0 available on ST Web page.
Please feel free to contact me for further details.
Regards,
Houda
2018-06-26 03:48 AM
Hello
kavak.engin
Please find in this discssion
https://community.st.com/0D50X00009Xkg2MSAR
,a new presentation created by
Panecki.Szymon.002
,which guides you to develop a simple CAN application with new API and how to migrate from old API to new API.
With Regards,
Imen
2020-01-15 11:03 PM
Hello,
I am facing the similar issue with STMCubeMX 5.3.0 and firmware version 1.24.2 . There are no pTxMsg and pRxMsg buffers available when I am generating a code through cube. I am using STM32F407 Discovery board. Kindly help.
typedef struct __CAN_HandleTypeDef
{
CAN_TypeDef *Instance; /*!< Register base address */
CAN_InitTypeDef Init; /*!< CAN required parameters */
__IO HAL_CAN_StateTypeDef State; /*!< CAN communication state */
__IO uint32_t ErrorCode; /*!< CAN Error code.