I'm tring to run my first twi program using nrf52. but I got complilation error no number named Power in NRF_TWI_Type
no number named Power in NRF_TWI_Type
it's strange because NRF_TWI1 called from twi_master_write for example doent have power attribute. I looked in the NRF_TWI_Type in rnf52.h file and couldnt find the attribute POWER !!
There is no POWER register available for the customer, see here. Where did you find information about this?
There is mentioned a POWER register in this errata. This register is normally not available for customers and hence not mentioned in the PS or nrf52.h. The address is specified however, so to toggle the POWER register for TWI0 (base at 0x40000000) you can execute this line of code:
*(volatile uint32_t *)0x40003FFC = 0;
*(volatile uint32_t *)0x40003FFC;
*(volatile uint32_t *)0x40003FFC = 1;
so what should I do in twi_master_write in twi_hw_master.c file, it's provided in sdk11 wiht power atribute, do I have to comment this??
That code is deprecated and the power register was used for a workaround on nRF51. Why can't you use nrf_drv_twi?
ok fine then, thanks