How to access GPREGRET2 with sd API call?
thanks
jing
How to access GPREGRET2 with sd API call?
thanks
jing
This is an unfortunate miss from our side, the s132 lacks API for setting the GPREGRET2 register. However, it is possible to workaround this by disabling the MWU when you want to access it:
#define TEST_UNPROTECT_POWER \
NRF_MWU->PREGION[0].SUBS &= ~(MWU_PREGION_SUBS_SR0_Include << MWU_PREGION_SUBS_SR0_Pos)
#define TEST_REPROTECT_POWER \
NRF_MWU->PREGION[0].SUBS |= (MWU_PREGION_SUBS_SR0_Include << MWU_PREGION_SUBS_SR0_Pos)
This has already been reported internally.
@Vidar Berg : is it possible that the code above doesn't work with Keil code optimization? I am using Keil and developpement phase was fine without code optimization (level 0), then compile for production with optimization level 3 and errors occur?!
@Vidar Berg : is it possible that the code above doesn't work with Keil code optimization? I am using Keil and developpement phase was fine without code optimization (level 0), then compile for production with optimization level 3 and errors occur?!