AnsweredAssumed Answered

Pointer to register

Question asked by Ricard Comas on Apr 12, 2019
Latest reply on May 21, 2019 by Mark Butcher

Hello everyone.

 

I'm using MCU KE04 series and I want write a register of CPU

 

For instance, the KBI0_PE (Pin Enable Register) can be found in 0x40079000 absolute address so, Can't i do this?

 

 

//////////////////////////////////////////////////////////////////////// CODE ////////////////////////////////////////////////////////////////////////

static const uint32_t BASE_ADDRESS_KBI0 = 0x40079000; //Base address
uint32_t *pointerRegister = NULL; //Initialization

 

pointerRegister = (BASE_ADDRESS_KBI0 + 8); //points to location fo KBI0_SC (40079008h)
*pointerRegister = 0xFEFFFFFF; //¿Write register?

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

it frozen MCU, why?¿

Outcomes