cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data with BRS on fdcan line

CANZT-FD
Associate II

 

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?

1 ACCEPTED SOLUTION

Accepted Solutions


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.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
SofLit
ST Employee

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.

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
CANZT-FD
Associate II

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-FD
Associate II

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

CANZT-FD
Associate II

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.

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



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.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.