AP_Periph: F103 CAN on PB8 and PB9

Is it possible to use PB8 and PB9 for CAN on STM32F103 based boards? I tried changing PA11 and PA12 to PB8 and PB9 in hwdef.dat but it does not work.

Good day…, hwdef files it’s based on the design of the board, if in the schematic they don’t have connected it, you cannot assign the pins you need

Hi Dave, yes I have a board with STM32F103CB and CAN transceiver connected to PB8 and PB9 which is connected to a flight controller with Copter firmware. If I connect the transceiver to PA11 and PA12 everything works, it runs Bootloader and then runs AP_Periph firmware.

Which board are you using right with PB8 and PB9

It is custom made, I can change pins to PA11 and PA12 but the goal of my question is to understand why PB8 and PB9 do not work with AP_Periph and Bootloader on STM32F103CB. Someone can hardwire PB8 and PB9 per datasheet and then this limitation will occur.

i must check it…, basically you built your board

Yes, that is right, I think that you can test the same using Blue Pill (maybe you need to change the chip to CB instead of C8) and some CAN transceiver. It is mainly for research in order to develop future boards based on this firmware.

I’ve never used the blue pill due MCU limitations, ive under developments some boards more powered

If you have some development board with STM32F103CB you can give it a try.

yes i have something ready… i will check it asap