Question
STM32 CanBus cannot get out of interrupt handler
Posted on February 28, 2017 at 12:01
hello dear forum, I try to make CANBUS of
RC work I managed to make CANBUS send message in loopback mode however when I turn on receive interrupt the processor hangs at first message and watchdog resets the micro --------------------------------------------- CAN_ITConfig(CAN1, CAN_IT_FMP0, ENABLE); --------------------------------------------- I suspect the code enters the interrupt handler and cannot leave it I want to ask how do I fill following lines to reset interupt flag and pending bit ( in std library I couldnot find any information about this ) --------------------------------------------- void USB_LP_CAN1_RX0_IRQHandler(void) { CAN_ClearFlag(CAN1, ??????????); CAN_ClearITPendingBit(CAN1,??????????); CanRxMsg RxMessage; CAN_Receive(CAN1, CAN_FIFO0, &RxMessage); --------------------------------------------- thank you#canbus #stm32f103