Stm32G431KBU6 CANFD can't work when BRS On?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-04-11 7:53 PM - last edited on 2024-04-12 12:39 AM by mƎALLEm
Hi community:
I'm using CANFD on stm32g431kbu6 board, but I find some issue that CANFD cant work normally with BRS ON,my config of CANFD show in the comments。Does anyone know about this?
Thanks
Solved! Go to Solution.
- Labels:
-
FDCAN
-
STM32G4 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-07 4:31 AM
You need to increase TSEG1 and TSEG2 as much as possible an decrease the prescaler either for Nominal or data phases.
TSEG1 ~= 80% (TSEG1+TSEG2) for sampling point at 80%
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-04-11 7:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-04-12 12:39 AM
Hello and welcome to the community.
First, please see these guidelines when posting:
Second, as stated in the guidelines above, you need to provide more information.
- What do you mean by "cant work normally"? no transmit? no receive? sometimes work sometimes not? please be concise.
- Did you test your solution in Loopback mode?
- Please provide details about your HW? which board? ST board? custom board? how about the transceiver? which transceiver part number?
- Please provide details about your CAN bus config? what is connected to?
- What about the clock source you're using? HSE/HSI?
- What about the filter config?
Need also to share your project, schematics if possible. Hard to tell about your issue based on the few lines you posted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-06 1:12 AM
OK, and I find the reason, there is another CAN node with inconsistent data area sampling points (80%)in my CAN bus,my setting is 75%,so when it work together, CAN bus hang up
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-06 6:08 AM
Hello,
Thank you for the feedback. But I'm not sure the issue is related to the sampling point. 80% or 75% as sampling points position don't make a difference, it could be something else .. May be it's a resolution of the bit time issue based on time quanta of that another CAN node.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-06 6:53 AM
Thanks for your reply,
I will keep on troubleshooting this issue. And I wanna know if the FDCAN of Stm32G431KBU6 can automatically recovery from bus-off status to error-active state?if yes, should i set some register bits to enable this feature like CAN_MCR:ABOM of Stm32f103 series?I did not find any register about this in RM0440 Reference manual
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-06 7:37 AM
Hello,
You need to open a new thread for this new question.
Thank you for your understanding :).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-07 4:00 AM
I find some issues in different config of FDCAN,
my configs list below:
PCLK of FDCAN is 160MHz
Data Prescaler:8
Data Sync Jump Width: 1
Data Time Seg1:2
Data Time Seg2:1
When I config like this, I saw that the TEC keep increasing until the CAN controller enters bus-off status, then DLEC changes from 0x100(Bit Error) to 0x111
But if I make some change,it works well, configs list below:
PCLK of FDCAN is 160MHz
Data Prescaler:4
Data Sync Jump Width: 1
Data Time Seg1:5
Data Time Seg2:2
So whats the minimal value of Data Time Seg1 and Data Time Seg2?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-07 4:01 AM
OK, I'll open a new one later, Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-07 4:28 AM
@eason_Yi wrote:
I find some issues in different config of FDCAN,
my configs list below:
PCLK of FDCAN is 160MHz
Data Prescaler:8
Data Sync Jump Width: 1
Data Time Seg1:2
Data Time Seg2:1
When I config like this, I saw that the TEC keep increasing until the CAN controller enters bus-off status, then DLEC changes from 0x100(Bit Error) to 0x111
But if I make some change,it works well, configs list below:
PCLK of FDCAN is 160MHz
Data Prescaler:4
Data Sync Jump Width: 1
Data Time Seg1:5
Data Time Seg2:2
So whats the minimal value of Data Time Seg1 and Data Time Seg2?
But this is not the values you shared in your first comment.. Otherwise I did suggest you to change this.
