8b391dc438
When the PAUSE or STOP command was triggered, the driver was first requesting the PDM peripheral to stop by calling nrfx_pdm_stop() and then it was setting a flag that was in turn checked in an interrupt that was generated when the PDM actually stopped (what happens a moment after the stop request is made). But that setting of the flag could get preempted and the interrupt handler could get executed first causing the stopping to be not handled properly and leaving the driver falsely considering the peripheral as still active. This commit reverses the order of these two operations to avoid the described race condition. Same sequence is corrected also in event_handler(), but this is done only for consistency (it is in the interrupt handler itself so there is no race possible in this case). Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
dmic_nrfx_pdm.c | ||
Kconfig | ||
Kconfig.dmic_pdm_nrfx | ||
Kconfig.mpxxdtyy | ||
Kconfig.tlv320dac | ||
mpxxdtyy-i2s.c | ||
mpxxdtyy.c | ||
mpxxdtyy.h | ||
tlv320dac310x.c | ||
tlv320dac310x.h |