update period value
This commit is contained in:
parent
d3f45af26b
commit
17ebf685b0
|
@ -29,7 +29,7 @@ void GPIO_PORT_F_init(void)
|
||||||
#define SYSTICK_RELOAD_VALUE(us) ((CLOCK_HZ / 1000000) * (us) - 1) // SysTick reload value in microseconds based on clock frequency
|
#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
|
volatile int duty = 50; // Initial duty cycle
|
||||||
const volatile int PWM_PERIOD = 1000000; // Period for 100kHz in microseconds (10ms)
|
const volatile int PWM_PERIOD = 1000; // Period for 100kHz in microseconds (10ms)
|
||||||
volatile int ontime = 0; // Variable to track on time
|
volatile int ontime = 0; // Variable to track on time
|
||||||
//volatile bool ledState = false; // State of the LED
|
//volatile bool ledState = false; // State of the LED
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue