Using Cortex M3 system timer

 

Write a program to toggle LED3 on STM32 board every 500 ms

The system timer registers base address is 0xE000E010

 

Offset Register
0 Control
4 Load
8 Value
12 Calibrate

 

Notes:

  • The CPU frequency is 24MHz (24000000 ticks/sec)
  • The timer is 24bits (max load value = 0xffffff)
  • Define the ISR as void (*)(void)
  • For more information read the chip manual

 

Change your program to toggle the LED every 2 seconds