cancel
Showing results for 
Search instead for 
Did you mean: 

CAN bus interaction with JTAG?

Posted on March 20, 2012 at 17:18

Hello.

I'm developing a time critical application with CAN bus.

In order to satisfy the time requirements, I send every 5ms a CAN message at 125kbps.

For debugging purpose, I have only one stm32f103c8t6 that send three consecutive messages with the above period.

If I analyze the traffic on the CAN bus, I can see that the sending period is correct if the board is connected via JTAG (I'm using a Segger JLink and an ARM Crossworks 1.7 compiler/debugger), but if I disconnect the debugger, the sending period becomes longer in a random way (ie. sometimes a packet is not sent, sometimes yes).

Could it be a correlation between JTAG and CAN peripherals?

Thank you in advance!

Alessandro Meliota
3 REPLIES 3
Nickname12663_O
Associate
Posted on March 26, 2012 at 06:18

Please check if your clock source is working fine. For instance, check if the crystal is oscillating fine or giving the correct frequency.

Posted on March 26, 2012 at 16:30

Sounds more like an initialization issue, JTAG attachment is NOT transparent, and may alter registers it needs.

Use the serial port for diagnostic output.

Examine peripheral registers, compare and contrast between JTAG and non-JTAG configurations.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
emalund
Associate III
Posted on March 27, 2012 at 14:29

one more possibility: insufficient power.  The JTAG supplies the extra bit.

Erik