usbcan ver.50 - fixed bug with error flags removing

This commit is contained in:
Edward Emelianov 2024-11-18 17:19:04 +03:00
parent 6b87f1e1f2
commit 6c0f71dcc3
4 changed files with 6 additions and 6 deletions

View File

@ -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 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; //if(*RFxR & CAN_RF0R_FULL0) *RFxR &= ~CAN_RF0R_FULL0;
*RFxR = 0; // clear FOVR & FULL *RFxR = 0; // clear FOVR & FULL
@ -380,11 +380,11 @@ static void can_process_fifo(uint8_t fifo_num){
void cec_can_isr(){ void cec_can_isr(){
if(CAN->RF0R & CAN_RF0R_FOVR0){ // FIFO overrun if(CAN->RF0R & CAN_RF0R_FOVR0){ // FIFO overrun
CAN->RF0R &= ~CAN_RF0R_FOVR0; CAN->RF0R = CAN_RF0R_FOVR0;
can_status = CAN_FIFO_OVERRUN; can_status = CAN_FIFO_OVERRUN;
} }
if(CAN->RF1R & CAN_RF1R_FOVR1){ if(CAN->RF1R & CAN_RF1R_FOVR1){
CAN->RF1R &= ~CAN_RF1R_FOVR1; CAN->RF1R = CAN_RF1R_FOVR1;
can_status = CAN_FIFO_OVERRUN; can_status = CAN_FIFO_OVERRUN;
} }
if(CAN->MSR & CAN_MSR_ERRI){ // Error if(CAN->MSR & CAN_MSR_ERRI){ // Error

View File

@ -1,2 +1,2 @@
#define BUILD_NUMBER "49" #define BUILD_NUMBER "50"
#define BUILD_DATE "2024-09-02" #define BUILD_DATE "2024-11-18"

View File

@ -158,7 +158,7 @@ clean:
flash: $(BIN) flash: $(BIN)
@echo " FLASH $(BIN)" @echo " FLASH $(BIN)"
$(STFLASH) write $(BIN) 0x8000000 $(STFLASH) --reset write $(BIN) 0x8000000
$(STFLASH) reset $(STFLASH) reset
boot: $(BIN) boot: $(BIN)