Hello,
I am experiencing a problem similar to this thread, when I am using the counter feature of timer 2 together with PPI to count the number of SPI DMA (SPI3 currently but I cnfirmed the problem with SPI0-3) transactions and stop data transfer when the required number has been reached. I was able to test this extensively in NRF52832 and confirm that it works with BLE. However the same implementation on NRF52840 seems to fail due to missed counter interrupts. The original thread did not post a solution to this so I am wondering if there is one. My interrupts are configured to priority 3 for both SPI and Timer/Counter. I am using 128-byte DMA transfers and transfer at least 2048 bytes at a time for read / write operations. The BLE code is currently leveraged from the Nordic NUS example and the device which writes the data to a SPI NAND chip is configured as the BLE Central. I am able to write thousands of 16kB files without a problem when BLE is off but as soon as I enable scanning, things go awry. Failure happens semi-randomly, within a couple of minutes or a couple of hours but if I trigger a 100-file write (approx 2.5s duration) it fails every time at some spot. Any help on this would be highly appreciated.
Thanks,
-Konstantin