cancel
Showing results for 
Search instead for 
Did you mean: 

CAN TD does not reach VCC on STM32F412CGU6

Avan .7
Associate

I am using a STM32F412CGU6 and selected PB_9 to be the CAN Tx pin. The pin then idles at 2.8 volts. If I use it as a standard IO pin, it will go to 3.3 volts. If I assign the CAN Tx pin to PA_12 it also idles at 3.3 volts.

I am using mbed 5.12

3 REPLIES 3
Uwe Bonnes
Principal II

It looks like you configured the pin as "open drain". Then you need a fiitimg pull up. If you have an external CAN tranceiver, do not configure as open-drain.

Avan .7
Associate

Thanks for the hint. It got me to step through the MBED/HAL initialization code and examine each configuration argument. To discover that I have been mapping the TD pin to the wrong output pin (PA_12 instead of PB_9) all the time. The configuration flexibility of MBED also makes it easier to goof.

Uwe Bonnes
Principal II

A good way to check setting is to start the application in a debuger, let it run, atach with a debugger and read and decipher the related setting. Tedious, but often helpfull.