parent
62519ab055
commit
ffecc74e44
|
@ -27,3 +27,8 @@ void GPIO_PORT_F_init(void)
|
|||
#define CLOCK_HZ 16000000 // Clock frequency of EK-TM4C123GXL
|
||||
#define INTEN (1 << 1) // Bit 1 of CSR to enable interrupt
|
||||
#define SYSTICK_RELOAD_VALUE(us) ((CLOCK_HZ / 1000000) * (us) - 1) // SysTick reload value in microseconds based on clock frequency
|
||||
|
||||
volatile int duty = 50; // Initial duty cycle
|
||||
const volatile int PWM_PERIOD = 1000000; // Period for 100kHz in microseconds (10ms)
|
||||
volatile int ontime = 0; // Variable to track on time
|
||||
//volatile bool ledState = false; // State of the LED
|
||||
|
|
Loading…
Reference in New Issue