s32k148 bus off autorecovery dosen't work

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

s32k148 bus off autorecovery dosen't work

844 Views
andreaone
Contributor I

Hi gents,

i want that after a bus off (ex, short the CANH and CANL and then remove the short) the module recovery and restart in automatic, to receive and send the messages again.

to do that i have set the CTRL1 register as follow, but if  i'm here it doesn't work. Have some suggestions about this argument? 

Capture.PNG

 

and another thing strange related to this argument are the ESR1.When i short the cables together, the interrupt rise and i stop to a breakpoint and here below the status register of ESR1. Why if i just short the cable (bus off), i have immidiately into the bit 19 a flag 1, i have the bus off how it can say that it can leave already the bus off state?

 

kind regards

 

 

 

 

 

0 Kudos
Reply
3 Replies

835 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

not sure what code do you use for testing, but bus off autorecovery should work normally. You can enter bus off when transmitting message and e.g. with that bus short. Then within cca 400 CAN bit times you enter bus off and for next cca 1400 CAN bit times autorecovery is finished and BOFFDONEINT is set. This is repeated still if short is kept on the bus.

If you have FZR bit cleared, that is FlexCAN continues to run even if you enter debug mode (stop the code) you can see BOFFDONEINT set.

 

BR, Petr

 

0 Kudos
Reply

830 Views
andreaone
Contributor I

HI, so if your suggestion are correct, why after a minute or even more 5 minutes, it don't recovery from bus off. I have as circuit the s32k48EVB-Q176 board where i'm developing the software, and on the other side a Vector dungle with cananalyzer that sending information and receive the information sended by the development board.

 

regards

0 Kudos
Reply

806 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

so what is a content of ECR and ESR1 registers after those 5 min when the issue appears. Is there any message prepared to be send in MBs? Is MCU or CAN tool sending anything on the bus in that time? What is the log/trace of CAN tool?

 

BR, Petr

0 Kudos
Reply