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
  • This is a simple example for configuring and enabling interrupts for GPIOTE PORT event:

    Hi,

    I want to use registers directly instead of GPIOTE driver. Using following piece of code to configure to enable interrupts for the EVENTS_PORT.

    void GPIOTE_IRQHandler()
    {
        gpiote->events_port = 0;
        wake_spis0();   // Application logic
    }

    void gpiote_init()
    {
        gpiote->events_port = 0;
        gpio->latch = 0;
        gpio->pin_cnf13 = (uint32_t)(2 << 16) ; // sense high
        gpiote->intenset |= (uint32_t)(1 << 31);        // enable interrupt for INTENSET
        *(uint32_t *)0xE000E100 |= (1 << 6);    // enable GPIOTE interrupt at NVIC
    }
    Is this the right way to use port events to receive the interrupt and work it around the Errata 97?
Reply
  • This is a simple example for configuring and enabling interrupts for GPIOTE PORT event:

    Hi,

    I want to use registers directly instead of GPIOTE driver. Using following piece of code to configure to enable interrupts for the EVENTS_PORT.

    void GPIOTE_IRQHandler()
    {
        gpiote->events_port = 0;
        wake_spis0();   // Application logic
    }

    void gpiote_init()
    {
        gpiote->events_port = 0;
        gpio->latch = 0;
        gpio->pin_cnf13 = (uint32_t)(2 << 16) ; // sense high
        gpiote->intenset |= (uint32_t)(1 << 31);        // enable interrupt for INTENSET
        *(uint32_t *)0xE000E100 |= (1 << 6);    // enable GPIOTE interrupt at NVIC
    }
    Is this the right way to use port events to receive the interrupt and work it around the Errata 97?
Children
Related