CANFD Bit Rate Select (bsr)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CANFD Bit Rate Select (bsr)

跳至解决方案
1,298 次查看
dougpaulsen
Contributor IV

Greetings:

Using MCUXpress 11.3 and SDK_2.x_LPCXpresso55S06 version 2.10.0, and executing sample project lpcxpresso55s06_mcan_interrupt_transer the CANFD Bit Rate Select bit, although set in the parameters passed in to lower level SDK functions is (according to my Picoscope CANFD decoding) not actually set in the CANFD transmitted header.  Indeed, I'm finding the data is transmitted at the selected 500k arbitration rate, not the specified 1M data rate, exactly as one would expect without the bsr bit being set.  This morning's task is to drill down into the SDK code to see where the brs bit is lost.

There appears to have been a fix for this published for an MPC SDK.  Is there a similar fix for the LPC55S06?  Or alternately am I overlooking something...?

Thanks for your thought!

标记 (1)
0 项奖励
1 解答
1,297 次查看
dougpaulsen
Contributor IV

I perhaps have found a simple solution.  In project lpcxpresso55s06_mcan_interrupt_transfer, and in file mcan_interrupt_tranfer.c - function main(), the following structure is defined:

   mcan_config_t    mcanConfig;

Somewhere before the SDK function call:

   MCAN_Init(EXAMPLE_MCAN, &mcanConfig, MCAN_CLK_FREQ);

insert the following:

   mcanConfig.enableCanfdSwitch = 1; 

Initial testing results look good!

在原帖中查看解决方案

0 项奖励
1 回复
1,298 次查看
dougpaulsen
Contributor IV

I perhaps have found a simple solution.  In project lpcxpresso55s06_mcan_interrupt_transfer, and in file mcan_interrupt_tranfer.c - function main(), the following structure is defined:

   mcan_config_t    mcanConfig;

Somewhere before the SDK function call:

   MCAN_Init(EXAMPLE_MCAN, &mcanConfig, MCAN_CLK_FREQ);

insert the following:

   mcanConfig.enableCanfdSwitch = 1; 

Initial testing results look good!

0 项奖励