Regarding your question, the flush sequences should be working fine.
You can check this easily from a debugger view, e.g.:
- receive n data
- suspend the execution and check that the RXFIFO buffer level (TRBSR.RBFLVL bit field) indicates that the data are in the buffer.
In my code above, I simply place a breakpoint before the RXFIFO read and I see that RBFLVL = 32.
Attachment 1977
- Flush the RXFIFO now and you will be able to see that RBFLVL is cleared to 0.
Regards,
Min Wei
You can check this easily from a debugger view, e.g.:
- receive n data
- suspend the execution and check that the RXFIFO buffer level (TRBSR.RBFLVL bit field) indicates that the data are in the buffer.
In my code above, I simply place a breakpoint before the RXFIFO read and I see that RBFLVL = 32.
Attachment 1977
- Flush the RXFIFO now and you will be able to see that RBFLVL is cleared to 0.
Regards,
Min Wei