Skip to main content
MRisu
Associate II
November 27, 2018
Question

CAN interface Difference between STM32F103R8 (64pin) and STM32F103T8 (36pin)

  • November 27, 2018
  • 2 replies
  • 948 views

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.

    This topic has been closed for replies.

    2 replies

    MRisu
    MRisuAuthor
    Associate II
    November 28, 2018

    No ideas or is it a difficult description?

    Tesla DeLorean
    Guru
    November 28, 2018

    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?

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    MRisu
    MRisuAuthor
    Associate II
    November 29, 2018

    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.