2020-12-08 03:32 AM
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
2020-12-08 04:00 AM
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.
2020-12-08 04:55 AM
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.
2020-12-08 05:57 AM
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.