FlexCAN_Deinit function i.mx RT 1064

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

FlexCAN_Deinit function i.mx RT 1064

跳至解决方案
1,016 次查看
ecorini
Contributor I

Hi, i'm trying to stop CAN putting MDIS=1 and then reinit on the 1064 board, to play with low power mode.

I'm using flexcan_interrupt_transfer example.

There is an hardfault when executing FLEXCAN_Init() function. Are there any particular operations that need to be executed before re-initialization of CAN peripheral?

 /*...*/
 
 /* stop FlexCAN peripheral */
 FLEXCAN_Deinit(EXAMPLE_CAN);
 /* re-init FlexCAN peripheral */
 FLEXCAN_Init(EXAMPLE_CAN, &flexcanConfig, EXAMPLE_CAN_CLK_FREQ);
 
 /*...*/

Thanks in advance

Emanuele

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
952 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hello Emanuele,

 

I have modified flexcan_loopback example and tested your situation. Unfortunately, I did not see the hardfault you mentioned when executing FLEXCAN_Init.

 

Could you please test the example attached. When loopback is running, if you press SW8 on the board, the example executes FLEXCAN_Deinit and FLEXCAN_Init. After that the example worked correctly on my side.

 

Please let me know your findings.

 

Best regards,

Felipe

在原帖中查看解决方案

2 回复数
953 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hello Emanuele,

 

I have modified flexcan_loopback example and tested your situation. Unfortunately, I did not see the hardfault you mentioned when executing FLEXCAN_Init.

 

Could you please test the example attached. When loopback is running, if you press SW8 on the board, the example executes FLEXCAN_Deinit and FLEXCAN_Init. After that the example worked correctly on my side.

 

Please let me know your findings.

 

Best regards,

Felipe

952 次查看
ecorini
Contributor I

You example it's working also on my side. Probably there is something wrong on my project

Thank you very much.

0 项奖励
回复