Skip to main content
Visitor II
April 7, 2021
Question

AN5405 and AN2606 (FDCAN bootloader) give different settings, which one are correct ?

  • April 7, 2021
  • 2 replies
  • 1624 views

Hello,

I am trying to interact with the FDCAN bootloader of the STM32L5.

I had no issue with the CAN bootloader of the STM32L4 (AN3154), but with the STM32L5 I am unable to even get an ACK from the target. 

1) According to AN2606 Rev 47, the bit-rate should be 0.5 Mbps. However, According to AN5405 rev 1, the FDCAN settings are 20MHz clock, 1 nominal pre-scaler, 0x3F Time Segment 1 and 0x10 Time segment 2. This means the bit-rate is 20/(1+0x3F+0x10) = 0.25 Mbps. What is the actual bit rate used by the FDCAN bootloader ?

2) The AN5405 rev 1 also specifies that the bootloader uses a classic filter with 0x111 ID and 0x7FF mask. This means the bootloader rejects all messages which CAN ID is different than 0x111.

But the bootloader commands are embedded in the CAN ID, so how can the bootloader receive the command messages ? For example, AN5405 specifies to send an empty message with ID 0x000 for the GET command, but such message would be filtered out...

I have tried many different settings but I am still unsuccessful in getting a response. I may be misunderstanding things, but I am out of ideas. Thanks a lot for your time !

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    April 13, 2021

    Hello @Gribouille​ and welcome to the STM32 Community :)

    Thanks for reporting this issue.

    I will check this and come back to you soon with update.

    Imen

    Visitor II
    August 29, 2022

    Hello,

    I am facing the same problem on a stm32g0b1.

    Fdcan Configuration (same as AN2606):

    Bitrate switching = activate

    nominal bitrate = 250 Kbits/s

    data bitrate = 1Mbits/s

    Once the bootloader is in fdcan mode, it does not respond to any fdcan id.

    I haven't found any solution to this issue yet.

    Thanks in advance for your time

    Visitor II
    August 29, 2022
    Hello,
    I was able to get the FDCAN bootloader to work with a nominal bitrate of 0.25 Mbps and data bitrate of 1 Mbps.
    At least it is functional on the STM32L5.
    I would suggest to first check whether the STM32 is setting the ACK field of your FDCAN messages or not.
    If it is not setting the ACK field then it might not have entered the bootloader mode, or you might be sending messages with the wrong bitrates.