Fix FDCAN incorrect FIFO acknowledgment

Fix incorrect way of acknowledging FIFO processing. Old code ORed old
value of register with index of FIFO buffer just processed, which
generated invalid value for acknowledge. This caused FIFO to repeatedly
returning same content. Both fdcan_receive() and fdcan_release_fifo were
affected.
This commit is contained in:
Eduard Drusa
2021-05-12 11:10:23 +02:00
committed by Karl Palsson
parent 1033131eb7
commit 9478931d69

View File

@@ -609,7 +609,7 @@ int fdcan_receive(uint32_t canport, uint8_t fifo_id, bool release, uint32_t *id,
} }
if (release) { if (release) {
FDCAN_RXFIA(canport, fifo_id) |= get_index << FDCAN_RXFIFO_AI_SHIFT; FDCAN_RXFIA(canport, fifo_id) = get_index << FDCAN_RXFIFO_AI_SHIFT;
} }
return FDCAN_E_OK; return FDCAN_E_OK;