2014-04-02 11:27 PM
Hello,
i am working with a STM32f103 with the integrated CAN controller and i use the std. periph library. In the functionCAN_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) */
CANx->MSR = CAN_MSR_ERRI;
/* Note : the corresponding Flag is cleared by hardware depending
of the CAN Bus status*/
CAN_MSR_ERRI is 0x0004;
Inthe 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 ''Clear CAN_MSR_ERRI''. Is this a bug? Can i use the function CAN_ClearITPendingBit(CAN1, CAN_IT_BOF); in the BusOff ISR? Thanks!!