can error interrupt

cancel
Showing results for 
Search instead for 
Did you mean: 

can error interrupt

497 Views
maojun
Contributor II

when STFERR detected,can error interrupt is occured.I found that the error interrupt ouccurted so fast (A few microseconds once).

it really affected the execution of my main program.

pastedImage_2.png

0 Kudos
8 Replies

227 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this is correct behavior. Once any of BIT1ERR, BIT0ERR, ACKKERR, CRCERR, FRMERR and STFERR are detected respective bit is set together with ERRINT. If ERRMSK is set then error interrupt is called.

BR, Petr

0 Kudos

227 Views
maojun
Contributor II

I can understand this behaver.But my question is it occurts  interrupt only  just 20 microsecond  once. Is this reasonable?

Tasks outside the interrupt can not execute.

0 Kudos

227 Views
PetrS
NXP TechSupport
NXP TechSupport

sorry I did not get the point. Could you please reword it again.

BR, Petr

0 Kudos

227 Views
maojun
Contributor II

Hi petr:

When ACKKERR and STFERR are detected,ERRINT is occurted.

My question is:

Error interrupts occur too often, about every 20 microseconds, and programs outside of the interrupts don't have enough time to run.

Based on the above facts,I don't think it's too good to have an error interrupt every 20 microseconds.

thanks a lot.

0 Kudos

227 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

errors are detected during message reception or transmission. So the occurrence depends on bus utilization. How often and what kind of message do you see on the bus?

If the module detect error often, it can point to wrong bit timing setting. I can suggest to check it to be sure all nodes use the same bit timing setting.

BR, Petr 

0 Kudos

227 Views
maojun
Contributor II

Hi  Petr:

I am testing on the bench, single node, no matching resistance,it occurts Persistent  STFERR.

BR.

0 Kudos

227 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if your node is not connected to the bus, you need to connect termination resistor between CANH/CANL lines otherwise message is not properly transmitted and a lot of error are detected. Try to measure CANH/CANL lines with and without termination resistor. With the resistor placed the message will be send periodically because of missing ACK. ACK error is only generated with the message rate.

BR, Petr 

0 Kudos

227 Views
maojun
Contributor II

Hi  Petr:

Maby design as same error occurs interrupt once,next interrupt occurs while new error happening.

That will be fine.

BR.

0 Kudos