CAN interface Difference between STM32F103R8 (64pin) and STM32F103T8 (36pin)
Hello there
Because I have less space on a new PCB and don't need all of the I/Os I want to take the smaller STMF103T8. As far as I know its the same silicium with less pins. So I can take the same software with some adjustments in the HAL.
With the R8 the CAN interface was remapped on PB8/PB9. The T8 has the CAN interface only on PA11/PA12. So I tested the CAN interface on my original R8 with the PA11/PA12 and it worked perfectly. But for some reason it doesn't work with the T8.
I don't find any posibilities anymore, so I hope you can help me.
Here are my port configurations for the CAN interface which works with the R8 but doesn't work with the T8:
RCC->APB2ENR |= 0x00000004; // enable port A
AFIO->MAPR &= 0xFFFF9FFF; // clear bits 14:13 (CAN1_REMAP)
GPIOA->CRH &= 0xFFF0FFFF; // clear PA12 configuration
GPIOA->CRH |= 0x00090000; // PA12: alternate function push-pull (2MHz)
I've also seen, that the T8 has some restrictions with timer1 if you use the CAN interface. But I'm using timer4.