I've noticed that the QSPY TX buffer can end up in a bad state.
This would manifest as the QS_priv_.head and QS_priv_.tail counters becoming permanently out of sync and QSPY TX data would always be outputting data from the past.
This problem was correlated with QS_RX messages coming into the system just before a QTimeEvt fired.
When tracing the problem, I noticed that the following functions were being pre-empted when our 1kHz tick fired and triggered a QTimeEvt, thus waking an AO:
QS_rxReportAck_
QS_rxReportError_
QS_rxReportDone_
This would result in several messages being pushed to the QSPY TX buffer while one of the above functions was already manipulating it.
To temporarily solve this problem, I added QF_INT_DISABLE()/QF_INT_ENABLE() guards to those functions. It seems like they should be critical sections.
I'm using QK 6.8.0 on an STM32L4.
Anonymous
Fixed in QP/C/C++ 6.8.2.
--MMS