I've been using the nrf_twi_mngr_perform() function assuming that my transaction was complete when the function returned. Because of this, I felt safe keeping my descriptors on the stack. However, it appears to me that if there are other transactions pending (placed via nrf_twi_mngr_schedule), the transaction you want to block on will be queued, and you will instead block on whatever the oldest transaction in the queue is. Unfortunately for me, my function exits, my descriptors go out of scope, and then my transaction is executed sometime later. It would be nice if the queue was double-ended and you could "pop from the back (or front)" when a "perform" was called vs a "schedule".
At this point, it seems to me that one shouldn't mix the use of "schedule" and "perform". Is that correct? Or am I mis-using the library? Thanks.
I'm working on a custom board based on the nRF52832. I'm developing on Win 8.1 using SES and a J-Link Plus. SDK version 14.1.