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

no member named POWER in 'NRF_TWI_Type {aka struct <anonymous>}'

Hello,

I am attempting to implement the TWI drivers from the SDK for a nrf52832 chip for a pca10040 board. I am using the twi_hw_master files to drive my TWI and insofar I have been unable to implement it because I am having the following issue when building:

twi_hw_master.c:53:21: error: 'NRF_TWI_Type {aka struct <anonymous>}' has no member named 'POWER'

That particular Struct is defined in the nrf52.h file. As far as I can tell this is entirely true and there actually is no member called POWER in NRF_TWI_Type, only in :

typedef struct {
  __IO uint32_t  POWER;                             /*!< Description cluster[0]: RAM0 power control register                   */
  __O  uint32_t  POWERSET;                          /*!< Description cluster[0]: RAM0 power control set register               */
  __O  uint32_t  POWERCLR;                          /*!< Description cluster[0]: RAM0 power control clear register             */
  __I  uint32_t  RESERVED0;
} POWER_RAM_Type;

Also, I am getting the following popup when I try to open declaration:

image description

(the path covered in red is exactly the same in both instances)

Is it possible I am including the file nrf52.h twice?

Can anyone lend a hand?
Thanks in advance!

Parents
  • POWER is gone in the nRF52 series - the chip does automatic power management so you no-longer have to, nor can- turn power on and off to individual peripherals. Any lines with POWER in them need to come out - or use the newer driver - that one's deprecated.

    And did you look at the piece of code which is using 'POWER'? It's a piece of code to work around a product anomaly in an old revision of the nrf51, so it's not even valid for the most recent nrf51 let alone the nrf52 series.

Reply
  • POWER is gone in the nRF52 series - the chip does automatic power management so you no-longer have to, nor can- turn power on and off to individual peripherals. Any lines with POWER in them need to come out - or use the newer driver - that one's deprecated.

    And did you look at the piece of code which is using 'POWER'? It's a piece of code to work around a product anomaly in an old revision of the nrf51, so it's not even valid for the most recent nrf51 let alone the nrf52 series.

Children
Related