2024-09-20 19:51:56 +05:30
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
2024-09-20 19:57:15 +05:30
|
|
|
#include "tm4c123gh6pm.h"
|
|
|
|
// SysTick memory-mapped registers
|
|
|
|
#define STCTRL *((volatile uint32_t *) 0xE000E010) // CONTROL AND STATUS
|
|
|
|
#define STRELOAD *((volatile uint32_t *) 0xE000E014) // RELOAD VALUE
|
2024-09-20 19:59:45 +05:30
|
|
|
#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
|