2018-11-27 06:48 AM
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.
2018-11-28 06:36 AM
No ideas or is it a difficult description?
2018-11-28 06:43 AM
It's a 10+ year old part design, and I don't care?
For F1's pay attention to what else is mapped to those pins and remap that off somewhere else, off into the void if necessary. Check the errata. Check a decade of posting on related topics.
Have you enabled the AFIO clock to allow remapping to work?
2018-11-28 11:25 PM
Yeah AFIO clock is enabled, otherwise it wouldn't works with the 64pin R8...
it must has a difference between the two controllers what influence the CAN interface.