AnsweredAssumed Answered

Resetting IT Pending bit for CAN interrupt

Question asked by schmitt.frank on Apr 3, 2014

i am working with a STM32f103 with the integrated CAN controller and i use the std. periph library.

In the function

CAN_ClearITPendingBit(CAN1, CAN_IT_BOF);

the entire CAN_MSR register will be overwritten but not the ERRI bit.

case CAN_IT_BOF:
        /* Clear CAN_MSR_ERRI (rc_w1) */ 
        /* Note : the corresponding Flag is cleared by hardware depending 
                  of the CAN Bus status*/

CAN_MSR_ERRI is 0x0004;

In the reference manual at bit descriction of ERRI of the CAN_MSR register i can read
"This bit is cleared by software". An in the code documentation of the std. per. lib. is also written

Is this a bug? Can i use the function CAN_ClearITPendingBit(CAN1, CAN_IT_BOF);
in the BusOff ISR?