i'm trying to learn the board STM32F3DISCOVERY from the reference manual
but I need a quick hint on why the stm32core library from Arduino app doesn't allow to modify the GPIOE->MODER
( at 0x48001000 ) so if someone can tell me how I can take the control of my register board ?
Code: Select all
volatile uint32_t* _GPIOE = (volatile uint32_t *) 0x48001000;
volatile uint32_t* ODR = (volatile uint32_t *) 0x48001014;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("Program start");
Serial.println(*_GPIOE,HEX);
*_GPIOE |= 0x40000; // writing fail disappointed...
// the stm32 core doesn't allow a direct writing at the adress
Serial.println(*_GPIOE,HEX);
GPIOE->MODER |= 0x40000; // writing fail again...
// even with it's own structure crazy...?
Serial.println(*_GPIOE,HEX);
pinMode(PE9,1); // the only way why?.
Serial.println(GPIOE->MODER,HEX);
Serial.println("There->");
Serial.println(*_GPIOE,HEX);
}
void loop() {
// put your main code here, to run repeatedly:
*ODR ^= 0x200;
Serial.println(*ODR,HEX);
Serial.println(GPIOE->ODR,HEX);
delay(500);
}