FLash erase hang the other process in PIC32

23 views Asked by At

I am using pIC32 mz series and trying to implement non blocking mode with interrupt and callback using flag.

static volatile bool xfer_done = false;
static void NVM_EventHandler(uintptr_t context) {
xfer_done = true; 
}

firmware_write() {
NVM_MultipleWordWrite( ptr, length, address );

       while(xfer_done == false);            
        xfer_done = false; 
}

i fill this is still blocking mode approach. How do we achieve non blocking mode

0

There are 0 answers