This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I can't reading and neither clearing FOVR flag in RF0R register

I'm using STM32F103 and I can't read and neither clear the flag, I'm trying in the interrupt function this is the code:

void USB_LP_CAN_RX0_IRQHandler (void)
{

if(CAN->RF0R & CAN_RF0R_FOVR0) { lost_frame++; CAN->RF0R |= CAN_RF0R_FOVR0; }

if (CAN->RF0R & CAN_RF0R_FMP0) { // message pending ? CAN_rdMsg (&CAN_RxMsg); // read the message Packages_received++; CAN_RxRdy = 1; // set receive flag }
}