cancel
Showing results for 
Search instead for 
Did you mean: 

Programming device drives CAN pins low!

ashley23
Associate II
Posted on November 16, 2010 at 21:43

Programming device drives CAN pins low!

3 REPLIES 3
Posted on May 17, 2011 at 14:15

Might depend on what initialization code you have in the processor. Does it occur with blank devices? Code executes as the probe resets and gains control.

JTAG doesn't infer any tristate behaviour, it being used to gain control of the processor internals, uploading data/code to ram and executing that code to write to the flash. It could probably talk directly to the flash registers, but that isn't usually as efficient.

The ROM boot loader code, at least in the parts I have, doesn't touch any of the pins other than the USART1 pins. So they would remain in there input-floating, reset, condition.

Jumper the part to boot from RAM or System ROM and see if that interferes with the CAN bus.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ashley23
Associate II
Posted on May 17, 2011 at 14:15

For some reason, this problem has got worse!

Now, whenever I call NVIC_SystemReset the CAN lines are driven low causing bus errors.  This occurs when stepping into the bootloader from main code.  This is our own boot loader, not the one built into our device.

If I scope the pins, step through the code, as soon as the system reset is called, the pins are driven low and the bus dies.  This wasn't a problem last week, so I am re-tracing my steps to work out what has changed...

I just want the pins to tri-state!  Does anybody have any experience with this sort of problem on the STM32?

ashley23
Associate II
Posted on May 17, 2011 at 14:15

Cancel that last post...  Just needed a pullup resistor.  Not sure why it decided over the weekend to become a problem but I am glad it did!  Pins do go into tristate as required.

Still goes nuts during code download however...