Defined clock Frequency and multiplication factor

This commit is contained in:
Uttam Bhavimani Bhavimani 2024-09-20 19:59:45 +05:30
parent 322eb69756
commit 0dc4b7361e
1 changed files with 3 additions and 1 deletions

4
main.c
View File

@ -4,4 +4,6 @@
// SysTick memory-mapped registers // SysTick memory-mapped registers
#define STCTRL *((volatile uint32_t *) 0xE000E010) // CONTROL AND STATUS #define STCTRL *((volatile uint32_t *) 0xE000E010) // CONTROL AND STATUS
#define STRELOAD *((volatile uint32_t *) 0xE000E014) // RELOAD VALUE #define STRELOAD *((volatile uint32_t *) 0xE000E014) // RELOAD VALUE
#define STCURRENT *((volatile uint32_t *) 0xE000E018) // CURRENT VALUE #define STCURRENT *((volatile uint32_t *) 0xE000E018) // CURRENT VALUE
#define CLOCK_HZ 16000000 // CLOCK FREQUENCY OF EK-TM4C123GXL
#define SYSTICK_RELOAD_VALUE(us) ((CLOCK_HZ / 1000000) * (us) - 1) // SYSTICK RELOAD VALUE