STM32F103 CAN ERRI bit always set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-02-28 8:43 AM
Hello,
I have a problem with CAN bus on STM32F103TB.I have CAN_ESR register = 0 but still I get bit ERRI in CAN_MSR = 1.If i try clearing it either via code or via debugger it will be set again by hardware.I've searched on lastest datasheet, reference manual and erratas but there is nothing.Any advice? Thanks #can #canbus #stm32f1- Labels:
-
CAN
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-02-28 9:31 AM
Ok, but what is happening externally on the bus, and in your system design and how does that reflect on the status and settings internally?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-02-28 10:01 AM
I'm trying to simulate bus faults and handle recovery.
I have only one other device on the bus, and i have ABOM enabled.This is what i'm doing:- i have a loop to send a message every 50ms. on reset everything works fine.- i remove the termination to simulate a fault. The code enters in CAN1_SCE_IRQHandler as expected.- when i restore the termination the transmission does not restart. If i clear ERRIE flag it restarts but ERRI stays true even if TEC reaches zero. That means if i enable again ERRIE bit i get stuck in the interrupt handler even all the fields in CAN_ESR are zero...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-02-28 10:38 AM
What's in all the other CAN registers and FIFOs, and what is the EC set too?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-30 1:08 AM
Hi,
the manual is not clear, I had same problem. You shoud clear ERRI flag by writing 1 to it (not writing 0).CAN1.MSR|=(1<<2);
Bye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-04-10 2:40 PM
