void setup() {
// put your setup code here, to run once:
RCC->IOPENR |= RCC_IOPENR_GPIODEN;
// Set PD1 as output (MODER register - bits [3:2] for PD1)
GPIOD->MODER &= ~(3U << (1 * 2)); // Clear bits
GPIOD->MODER |= (1U << (1 * 2)); // Set as output (01)
Serial.begin(115200);
Serial.println("Hello, STM32!");
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}