CAN respond-back time

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

CAN respond-back time

Jump to solution
695 Views
domd33
Contributor I

Hi, I need to get my CAN to respond to an incomming frame within a 22us time window following the ACK. This needs to be done using interrupt mode. The CAN speed is 500Kb/s and I'm running HSRUN at 112MHz. The best I've done so far is 24us.

Here are two things I've noticed:

1- My interrupt kicks in one CAN bit after the end-of-frame. This means that I'm loosing 2us here.
2- When the first thing I do in the interrupt is send a message back (through CAN_Send function), it takes about 5us for that message to start sending (giving me the 24us). On the counterpart, if I do some treatment and send it later (at least after the 24us mark after the ACK), it only takes 1,3us.

The second point leads me to believe that there is something hard coded that sets that 24us limit.

Looking through the Reference Manuel, I haven't found a way to shorten that time to allow me to get equal or bellow 22us.

0 Kudos
1 Solution
680 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if you measure the time after ACK bit in the CAN frame then there is another 11 CAN bits (ACK del, EOF, INT) till new message can be sent (start sending). This assumes MB is already prepared, selected by internal arbitration and moved to the SMB. For 500kbps that is 22us.
If you start to prepare TX MB after RX MB flag is set, that could be during bit 2 of INT frame or further, then message will not be started after that 22us after ACK but 1 CAN bit later, at the earliest. Arbitration starts at bus Idle. 

BR, Petr

View solution in original post

0 Kudos
1 Reply
681 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if you measure the time after ACK bit in the CAN frame then there is another 11 CAN bits (ACK del, EOF, INT) till new message can be sent (start sending). This assumes MB is already prepared, selected by internal arbitration and moved to the SMB. For 500kbps that is 22us.
If you start to prepare TX MB after RX MB flag is set, that could be during bit 2 of INT frame or further, then message will not be started after that 22us after ACK but 1 CAN bit later, at the earliest. Arbitration starts at bus Idle. 

BR, Petr

0 Kudos