mirror of
https://github.com/eddyem/stm32samples.git
synced 2025-12-06 02:35:23 +03:00
usbcan ver.50 - fixed bug with error flags removing
This commit is contained in:
parent
6b87f1e1f2
commit
6c0f71dcc3
@ -372,7 +372,7 @@ static void can_process_fifo(uint8_t fifo_num){
|
||||
}
|
||||
}
|
||||
if(CAN_messagebuf_push(&msg)) return; // error: buffer is full, try later
|
||||
*RFxR |= CAN_RF0R_RFOM0; // release fifo for access to next message
|
||||
*RFxR = CAN_RF0R_RFOM0; // release fifo for access to next message
|
||||
}
|
||||
//if(*RFxR & CAN_RF0R_FULL0) *RFxR &= ~CAN_RF0R_FULL0;
|
||||
*RFxR = 0; // clear FOVR & FULL
|
||||
@ -380,11 +380,11 @@ static void can_process_fifo(uint8_t fifo_num){
|
||||
|
||||
void cec_can_isr(){
|
||||
if(CAN->RF0R & CAN_RF0R_FOVR0){ // FIFO overrun
|
||||
CAN->RF0R &= ~CAN_RF0R_FOVR0;
|
||||
CAN->RF0R = CAN_RF0R_FOVR0;
|
||||
can_status = CAN_FIFO_OVERRUN;
|
||||
}
|
||||
if(CAN->RF1R & CAN_RF1R_FOVR1){
|
||||
CAN->RF1R &= ~CAN_RF1R_FOVR1;
|
||||
CAN->RF1R = CAN_RF1R_FOVR1;
|
||||
can_status = CAN_FIFO_OVERRUN;
|
||||
}
|
||||
if(CAN->MSR & CAN_MSR_ERRI){ // Error
|
||||
|
||||
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
#define BUILD_NUMBER "49"
|
||||
#define BUILD_DATE "2024-09-02"
|
||||
#define BUILD_NUMBER "50"
|
||||
#define BUILD_DATE "2024-11-18"
|
||||
|
||||
@ -158,7 +158,7 @@ clean:
|
||||
|
||||
flash: $(BIN)
|
||||
@echo " FLASH $(BIN)"
|
||||
$(STFLASH) write $(BIN) 0x8000000
|
||||
$(STFLASH) --reset write $(BIN) 0x8000000
|
||||
$(STFLASH) reset
|
||||
|
||||
boot: $(BIN)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user