cancel
Showing results for 
Search instead for 
Did you mean: 

SPC564B74 FlexCANs are limited to 32 Mailboxes instead of 64

aurelien23
Senior
Posted on September 02, 2015 at 15:30

Hello,

I'm using SPC5Studio V3.6 and SPC564B74. The HAL drivers are limiting FlexCAN mailbox number to 32 but this CPU has 64 MB per FlexCAN.

I can change SPC5_CAN_NUM_RX_MAILBOXES and SPC5_CAN_NUM_TX_MAILBOXES définitions in mcuconf.h but this file seems not to be ''patchable''. It has to be changed manually every time the code is generated.

Fixes is welcome.

Aurélien
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
Erwan YVIN
ST Employee
Posted on September 02, 2015 at 17:41

Hello Aurelien,

there is well an issue SPC564B74 HAL Drivers component.

it should be limited to 64 not

we are correcting the issue.

in waiting for SPC5Studio 3.7, i advice you to put in patch mode in can_lld.c

(Cf below)

/**

* @brief Number of RX mailboxes.

*/

#undef SPC5_CAN_NUM_RX_MAILBOXES

#if !defined(SPC5_CAN_NUM_RX_MAILBOXES) || defined(__DOXYGEN__)

#define SPC5_CAN_NUM_RX_MAILBOXES YOUR_VALUE

#endif

/**

* @brief Number of TX mailboxes.

*/

#undef SPC5_CAN_NUM_TX_MAILBOXES

#if !defined(SPC5_CAN_NUM_TX_MAILBOXES) || defined(__DOXYGEN__)

#define SPC5_CAN_NUM_TX_MAILBOXES YOUR_VALUE_2

#endif

#if (SPC5_CAN_NUM_RX_MAILBOXES < 1) || (SPC5_CAN_NUM_RX_MAILBOXES > 64)

#error ''invalid number of RX mailboxes''

#endif

#if (SPC5_CAN_NUM_TX_MAILBOXES < 1) || (SPC5_CAN_NUM_TX_MAILBOXES > 64)

#error ''invalid number of TX mailboxes''

#endif

#if (SPC5_CAN_NUM_RX_MAILBOXES + SPC5_CAN_NUM_TX_MAILBOXES) > 64

#error ''invalid amount of RX and TX mailboxes''

#endif

Best regards

Erwan