cancel
Showing results for 
Search instead for 
Did you mean: 

Reset error condition in CAN?

michaldemin
Associate II
Posted on March 30, 2010 at 01:24

Reset error condition in CAN?

3 REPLIES 3
smart2
Associate II
Posted on May 17, 2011 at 13:45

you can not read or write to CAN errors , all errors are managed by internal hardware TX counter/RX counter state machine, check STM32 can controller datasheet.

michaldemin
Associate II
Posted on May 17, 2011 at 13:45

oh, yes. I know that !

Why does the stdlib do it then ? How does one clear error ?

nicklas
Associate
Posted on May 17, 2011 at 13:45

The only way that I have found so far, is to reset the bxCan module with the APB1 peripheral reset register

RCC_APB1RSTR |= RCC_APB1RSTR_CAN1RST;

 RCC_APB1RSTR &= ~RCC_APB1RSTR_CAN1RST;

Remembert to go to initialization mode first and then reload bitrate etc. after the reset.

Cheers / Nicklas