I have another longer question regarding an SPI led driver I’m working with that has some strict timings, but I wanted to ask a more succinct question here since I think I may not be entirely clear on how the EasyDMA works with SPIM and an answer here may save me a lot of head scratching.
I'd like to know if there is any way to send data via SPIM and to ensure that the soft device won’t interrupt and hold the clock for longer than 10us or so? In the end I really only need to be able to send two bytes with an assurance that I won’t have them interrupted and a delay added between since that times out the peripheral.
Some points/questions
- Ive been told this is exactly what EasyDMA does, schedules a transfer that won’t be interrupted up to 255 bytes. I’ve tried with EasyDMA enabled though and I still occasionally see the clock hang for close to 30us
• I also tried sending only two bytes at a time using the nrf_drv_spi_transfer() method and then sending the next pair of bytes when I get the return event. This seemed to work great since the first two bytes sent together because of the double buffer, but then on the rare occasion I would see the bytes split again by 10us+
• Question: Would moving these transfers to the main context either via a flag or the app scheduler prevent the soft device from breaking in?
-
Question: Is there simply no way to guarantee the soft device won’t break in, even for as little as two bytes?
-
Question: if this should be working via EasyDMA, can someone point me to a clear way to test if easyDMA is enabled (I’m in segger embedded) but a simple way to check the DMA status at runtime and log it works too!
-I've attached a logic capture showing the breaks though prob not necessary since this is ideally cut and dry and I can either reliable block the soft device or I can't, hopefully a nordic employee can put this to rest relatively easily. !