FlexCAN_Deinit function i.mx RT 1064

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FlexCAN_Deinit function i.mx RT 1064

Jump to solution
837 Views
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

Labels (1)
Tags (2)
0 Kudos
1 Solution
773 Views
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

View solution in original post

2 Replies
774 Views
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

773 Views
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 Kudos