> Any idea?
A software bug. In MQX or the way you're calling it. Have you searched for a matching problem?
There was a bug reported in 3.7. I would guess this should be fixed or it may not be working at all.
QSPI Driver Bug?
> while ((0 != io_info_ptr->RECEIVING) ||
> (0 != io_info_ptr->ONTHEWAY) ||
> (qspi_ptr->QDLYR & MCF5XXX_QSPI_QDLYR_SPE))
All three of those have to be FALSE for it to get out of that loop. So which ones aren't zero and why? That's the obvious approach to find why an "if statement" isn't doing what you expect.
The only hardware register is the QDLY one, waiting for the SPE bit to clear. Once that has been set, it will clear when the transfer has been completed. The only ways I can think of to have this not clear would be to program an "infinite loop" in the QWR, or to maybe disable the QSPI by writing QMR[BAUD] to zero. Otherwise it must finish.
"RECEIVING" and "ONTHEWAY" must be flags that are set by *OTHER* threads or by interrupt routines. It is up to the software to handle these.
So when it is locked up, WHY is it locked up? Which of those two variables and the hardware register is non-zero. Then found out why it is wrong.
Here's another interesting question that a search found:
Mutex with QSPI?
What happens if you have TWO MQX threads trying to control two separate SPI-connected devices through the one QSPI driver?
Nothing good. Nothing good AT ALL! Are you trying to do this?
Tom