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

Workaround for Errata 97

Hi,

As per the Errata 97, there is increase in current consumption if GPIOTE is used in Input mode. We are working on low power device and cannot afford increase in current consumption.

My question is how can we get interrupts on the PORT without using GPIOTE?

The workaround for this erratum says "Use Port event to detect transitions on inputs instead of GPIOTE input mode". Can you guide us to the example code to use port events for interrupts?

Will there be any fix for this erratum from nordic side in near future?

Thanks,

Justin

Parents
  • Hi,

    If you are using the GPIOTE driver, you can use PORT mode by setting the hi_accuracy parameter in the config to 0. If you are writing the registers directly, it should be sufficient to configure the GPIO with SENSE enabled and enable interrupts for the EVENTS_PORT event.

    This errata has been inherited from nRF52832 engineering A revision, I do not expect it to be fixed in any potential future spin of this chip. It seems to be fixed in never nRF52 series chips.

    Best regards,
    Jørgen

  • Hi Jorgen,

    I am writing to the registers directly. Following is my code.

    void GPIOTE_IRQHandler()
    {

        gpiote->events_in0 = 0;
        wake_spis0(); // This function enables the spi communication
       
    }

    void gpiote_init()
    {
        gpiote->config0 = (1 << 16)          // Polarity ... LoToHi
                       | (15 << 8)           // PSEL ....... P0.15
                      | (1 << 0);           // MODE ....... Event
         gpiote->intenset = (1 << 0);     // enable interrupt for config0
        *(uint32_t *)0xE000E100 = (1 << 6);  // enable GPIOTE interrupt at NVIC
           
    }
    I tried enabling SENSE and EVENTS_PORT but nothing worked out for me.
    Can you please advice me in above code how can I configure GPIO interrupt and take care of Errata 97?
Reply
  • Hi Jorgen,

    I am writing to the registers directly. Following is my code.

    void GPIOTE_IRQHandler()
    {

        gpiote->events_in0 = 0;
        wake_spis0(); // This function enables the spi communication
       
    }

    void gpiote_init()
    {
        gpiote->config0 = (1 << 16)          // Polarity ... LoToHi
                       | (15 << 8)           // PSEL ....... P0.15
                      | (1 << 0);           // MODE ....... Event
         gpiote->intenset = (1 << 0);     // enable interrupt for config0
        *(uint32_t *)0xE000E100 = (1 << 6);  // enable GPIOTE interrupt at NVIC
           
    }
    I tried enabling SENSE and EVENTS_PORT but nothing worked out for me.
    Can you please advice me in above code how can I configure GPIO interrupt and take care of Errata 97?
Children
No Data
Related