Time to send the first "CAN Frame" from "Cortex-M4"?

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

Time to send the first "CAN Frame" from "Cortex-M4"?

565 Views
ahmed_essam
Contributor III

Hello all,

Hope this question finds you all well.

Kindly, I am trying to control the "FlexCAN" module from the "i.MX8QXB0 Cortex-M4".

The problem I am having right now is, the huge time to send the first "CAN Frame" from the "SOC" which is "284ms"!

Please, take care of the following remarks:

1- This "284ms" is measured from the early stage in the "main()" function (in main.c file) until the reception of the 1st "Tx Confirmation Interrupt" (by raining/lowering HW. pin (LSIO_GPIO0_P_24) measured by oscilloscope).

2- After the 1st frame, the time consumed to send any other frame is very small (140~250us) so, the problem is just when sending the 1st frame.

3- The delay is constant no matter the number of retries (always 284ms delay). 

4- I expected the problem to exist in the "Interrupt Handling Mechanism" so, I used "CAN Polling" instead however, the exact same delay is obtained again.

5- The most unexpected thing is that, I inserted a "200ms" delay in the beginning of the "main()" function (also, inserted after calling "FLEXCAN_TransferFDSendNonBlocking() in another experiment) however, the delay was still "284ms"!

This means that, the part causing the delay (284ms) is not any code started in "main.c" at all!

Because if it was, the delay would have increased to "284 + 200(intended delay) = 484ms" which didn't happen.

Therefore, I greatly expect to have a problem either in the "SCFW" or in the hardware itself. 

6- The used software is attached.

Environment Information:

SOC: i.MX8QXP (rev. B0)
SCFW Version: 1.2

SDK Version: 2.5.2

Waiting for your feedback.

Thank you very much.

Best Regards.

0 Kudos
0 Replies