CAN on STM32F4xx

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
chrismas9
Posts: 124
Joined: Wed Jun 25, 2014 10:07 am

Re: CAN on STM32F4xx

Post by chrismas9 » Wed Nov 13, 2019 7:56 pm

Do you have a Pyboard or any Nucleo or Discovery board with dual CAN MCU. It might be worth trying your hardware and test script on other hardware.

kcoelho
Posts: 23
Joined: Fri Aug 02, 2019 5:40 pm

Re: CAN on STM32F4xx

Post by kcoelho » Thu Nov 14, 2019 3:09 pm

chrismas9 wrote:
Wed Nov 13, 2019 7:56 pm
Do you have a Pyboard or any Nucleo or Discovery board with dual CAN MCU. It might be worth trying your hardware and test script on other hardware.
I think I managed to fix it.
The problem seems to go away after I initialize the Standby pins on each of the transceivers and then do a board reset.

Not entirely sure why this works but will try to make this repeatable to find the real reason why.

Thank you so much for your help

chrismas9
Posts: 124
Joined: Wed Jun 25, 2014 10:07 am

Re: CAN on STM32F4xx

Post by chrismas9 » Fri Nov 15, 2019 2:35 am

If the STBY is high or floating the device will sleep until it sees a dominant star on the bus. This means the transceiver at the listening end will wake up after a delay. The sending end will not wake up if you want to send. You need to either tie STBY low or drive it low before sending. It is also possible that the wakeup delay at the listening end (up to 40uS) may cause the beginning of the message to be lost.

Post Reply