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

NRF52832 Anomaly 89 - When should the workaround be applied?

Dear support,

Anomaly 89 of the NRF52832 states that a high static current consumption is observed when the SPIM/TWIM uses EasyDMA and the GPIOTE is configured in event mode. The workaround, copied below, consist on "power cycling" the peripheral, by toggling its POWER register.

// Workaround  code for the TWIM0/SPIM0
*(volatile uint32_t *)0x40003FFC = 0;
*(volatile uint32_t *)0x40003FFC;
*(volatile uint32_t *)0x40003FFC = 1;

From this thread, I can understand why it happens (TWIM/SPIM not releasing the HFCLK after a transition is over) and from this other thread, it is clear that the workaround, despite leaving the TWIM/SPIM powered on, the peripheral does not consume power because it is not configured.

However, I remain with two doubts:

1. Must the TWIM module be disabled after each transition is completed? If so, after finishing my transaction, should I run the following snippet, where tw1_instance is the nrf_drv_twi_t instance?

// disable module
nrf_drv_twi_disable(&twi1_instance);

// uninitialize TWI module
nrf_drv_twi_uninit(&twi1_instance);

*(volatile uint32_t *)0x40004FFC = 0;
*(volatile uint32_t *)0x40004FFC;
*(volatile uint32_t *)0x40004FFC = 1;

2. If I want to unitialize the module, i.e., not use it again (for instance, before going to sleep), do I still need to apply the workaround?

Thank you in advance,
Pedro

Parents
  • Hi,

    1. It depends a bit on your application. More specially how much time it goes between transactions. In most cases it should be good enough to run the workaround when you are done using the peripheral. Typical usecase would be before going to sleep, as this is usually where a low current draw is most important. 
    2. Yes, you should run the workaround, Uninitializing the peripheral does not ensure that the HFCLK is released properly. It needs a complete power cycle.

    regards

    Jared 

Reply
  • Hi,

    1. It depends a bit on your application. More specially how much time it goes between transactions. In most cases it should be good enough to run the workaround when you are done using the peripheral. Typical usecase would be before going to sleep, as this is usually where a low current draw is most important. 
    2. Yes, you should run the workaround, Uninitializing the peripheral does not ensure that the HFCLK is released properly. It needs a complete power cycle.

    regards

    Jared 

Children
Related