Writing to settings (non-volatile memory) causes GPIO interrupt triggering losses

SDK 2.1.0

nRF9160

Hi,

I recently configured a GPIO input in my project with an associated interrupt whenever it detects a high to low transition. The transition is externally generated every 20ms.

With each interruption, a work is rescheduled.

Everything works as expected until there is a great write (buffer[3500]) to the Settings.

After writing, the work is executed, meaning that the transition was not detected.

It seems to me that it's a problem of priorities...

I wanted to know if it is possible, and how, to change the priority of GPIO interrupts.

Regards,

Ricardo

  • Hi Edvin,

    Whenever you get a GPIO interrupt, it will be sent to your application

    I don't send it whenever I receive an interruption, on the contrary, I'm interested in detecting the lack of interruptions, whenever I receive a GPIO interruption I reschedule a work for 25msec (it waits for the next interruption), in the absence of an interruption the work is executed and then it reports the failure to the application.

    What it seems to me is happening is that because writing to flash takes more than 25msec, when it finishes, the work is queued and executed, reporting a false lack of interrupt to the application.

    That's why I said that the best solution would be to cancel the work before writing...

    Regards,

    Ricardo

    Edit:
    I will try something else, I will transfer all settings storage to external flash, this should solve the problem.

    Edit 2:
    Just to say that moving settings storage to external flash solves the problem.

Related