Closed daykin closed 3 years ago
LGTM. Seems like the failing CI jobs are unrelated.
Your patch is to write one to DataBufCtrl[DBCS]
(as I incorrectly guessed). However, the documentation I have says:
Data Buffer Checksum Error (read-only) Flag is cleared by writing ‘1’ to DBRX or DBRDY or disabling data buffer
I'm doing the former:
So I'm still at a loss to explain why you say a repeated error.
@jpietari Can you clarify on the proper way to clear a checksum error? Maybe the RXENA
bit should be toggled?
The checksum error flag is cleared if the data buffer is armed from a "receive complete" state (by writing a '1' to bit 15, DBRX). Another way is to write a '1' to bit 14 (DBDIS) to unarm the data buffer and this should always work regardless of the data buffer state.
Writing to DBCS does not do anything.
After adding this line, I attempted to reproduce the problem (#19) 20+ times and was unable to.