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

2
main.c
View File

@ -5,3 +5,5 @@
#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