Skip to main content
Explorer
November 21, 2024
Solved

Reading data with BRS on fdcan line

  • November 21, 2024
  • 4 replies
  • 1356 views

 

I am using STM32H5RE23T6.

I implemented the function of receiving data from the FDCAN line.

When I select FDCAN mode without BRS, it works without any problems.

When I select with BRS mode.
I set the arbitration phase to 1mbps.
I set the data phase to 8 mbps.

I cannot receive 8Mbps data in BRS mode.

I set the data phase speed to 2Mbps. I can receive data in BRS mode, but I cannot receive data at 8Mbps.

I have 2 reasons for this.

Firstly, the can transceiver may not support this speed.
The can transceiver I use is TCAN334D.
It says up to 1 Mbps in the datasheet, but I was able to get 2Mbps as well.


My other reason is
HAL_FDCAN_ConfigTxDelayCompensation and HAL_FDCAN_EnableTxDelayCompensation

We can send data up to 8Mbps using the functions, I saw on the forum that it says so in this link.

But I don't know how to do it. Can anyone explain in more detail?

    This topic has been closed for replies.
    Best answer by mƎALLEm


    Ok but D suffix was not listed in their table:

    SofLit_0-1732196727188.png

    Enable the delay compensation but the most important thing is to use a transceiver that can reach 8Mb/s.

    And it worked at 2Mb/s because the chip manufacturer has a margin and that could not work for all the conditions. 

    Hope that answers your question.

    4 replies

    Technical Moderator
    November 21, 2024

    Hello,


    @CANZT-FD wrote:

    Firstly, the can transceiver may not support this speed.
    The can transceiver I use is TCAN334D.
    It says up to 1 Mbps in the datasheet, but I was able to get 2Mbps as well.

    No, the TCAN334D datasheet says that it could reach 5Mb/s:

    SofLit_0-1732194358280.png

    So that's normal you didn't get it worked at 8Mb/s but worked at 2Mb/s.

    Replace the transceiver: example: MCP2561FD or MCP2562FD to reach 8Mb/s.

    Meanwhile, read this article: STM32 FDCAN running at 8 Mb/s on NUCLEO boards: Same bitrates you are using

    Hope I answered your question.

     

     

    CANZT-FDAuthor
    Explorer
    November 21, 2024

    Thanks for your answer.

    The speed up to 5Mbps is written for TCAN33..G series, I am using the D series. so it may not support 5Mbps speed..

    I can change the transceiver. I can use MCP series, but I am wondering if it can be fixed with the functions written here..

     

    https://community.st.com/t5/stm32-mcus-products/stm32h7-fdcan-8-mbit-s-setup-docum-unclear-sync-seg/td-p/79992

    CANZT-FDAuthor
    Explorer
    November 21, 2024

    Thanks for your answer.

    The speed up to 5Mbps is written for TCAN33..G series, I am using the D series. so it may not support 5Mbps speed..

    I can change the transceiver. I can use MCP series, but I am wondering if it can be fixed with the functions written here..

     

    https://community.st.com/t5/stm32-mcus-products/stm32h7-fdcan-8-mbit-s-setup-docum-unclear-sync-seg/td-p/79992

    mƎALLEmAnswer
    Technical Moderator
    November 21, 2024


    Ok but D suffix was not listed in their table:

    SofLit_0-1732196727188.png

    Enable the delay compensation but the most important thing is to use a transceiver that can reach 8Mb/s.

    And it worked at 2Mb/s because the chip manufacturer has a margin and that could not work for all the conditions. 

    Hope that answers your question.

    CANZT-FDAuthor
    Explorer
    November 21, 2024

    If it could support up to 5 Mbps speed. It should have supported 4Mbps speed, but it does not work at 4Mbps.

    CANZT-FDAuthor
    Explorer
    November 21, 2024

    uint32_t TdcOffset = 5;
    HAL_FDCAN_ConfigTxDelayCompensation(&hfdcan1, TdcOffset, 0) ;

    HAL_FDCAN_EnableTxDelayCompensation(&hfdcan1);

    I can't decide whether it can be solved with the above functions or whether the problem is hardware related.