This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52 write buffer

In the migration guide, I can read: "Clearing an interrupt event may not take effect immediately."

And an example of required code is given as:

 NRF_TIMER0->EVENTS_COMPARE[0] = 0;
 (void)NRF_TIMER0->EVENTS_COMPARE[0];

When looking in SDK/components/drivers_nrf/*, I don't seem to see such constructions. Is there some other conditions that make this code not necessary?

thanks

Parents
  • Hi Stephane,

    It's true that in some of our driver we still haven't implemented that. I guess it was due to we ported the driver partly from the code from nRF51 and haven't updated it to meet with the requirement for nRF52. We haven't seen consequence of doing that but we should update them.

    You can find in some driver we actually did that, for example in nrf_clock_event_clear() function.

    I have reported it to R&D and we will try to update the code.

    I would suggest you to add the code to do a dummy read every time your clear an interrupt register.

  • Hi Stephane,

    My understanding is that the possible issue with clearing the interrupt event register is more critical than writing to execute a task or to configure a register as the interrupt can be triggered multiple time if it's not cleared properly before existing the IRQ handler. I don't see potential issue when there is a delay when executing writing to task or register.

    When writing to a task, usually you have to make sure the task has been executed with a while loop to read the register (_STARTED register).

Reply
  • Hi Stephane,

    My understanding is that the possible issue with clearing the interrupt event register is more critical than writing to execute a task or to configure a register as the interrupt can be triggered multiple time if it's not cleared properly before existing the IRQ handler. I don't see potential issue when there is a delay when executing writing to task or register.

    When writing to a task, usually you have to make sure the task has been executed with a while loop to read the register (_STARTED register).

Children
No Data
Related