2024-11-21 04:54 AM - last edited on 2024-11-21 05:08 AM by SofLit
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?
Solved! Go to Solution.
2024-11-21 05:47 AM - edited 2024-11-21 05:47 AM
Ok but D suffix was not listed in their table:
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.
2024-11-21 05:07 AM - edited 2024-11-21 05:10 AM
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:
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.
2024-11-21 05:34 AM
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..
2024-11-21 05:40 AM
If it could support up to 5 Mbps speed. It should have supported 4Mbps speed, but it does not work at 4Mbps.
2024-11-21 05:42 AM
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.
2024-11-21 05:43 AM
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..
2024-11-21 05:47 AM - edited 2024-11-21 05:47 AM
Ok but D suffix was not listed in their table:
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.