Hello everyone, I read SYST_CVR register in LPC5528 microcontroller all the time to 0.
void Test_sys_timer(void)
{
uint32_t time1,time2 = 0;
SYST_CVR = 0xffffffff;
SYST_CSR = 0x5;
time1 = SYST_CVR;
delay();//os_msleep(1);
time2 = SYST_CVR;
//SYST_CSR = 0x00;
usb_echo("data = %u\r\n",time1-time2);
}
I don't know why, please help me, or could you please recommend me a clock configuration for SYST_CVR, I don't know much about it.
Thank you
Greetings from MHY.
Hello @MHY_0878,
The SDK (version 25.03) includes an example named "led_blinky_lpc" that demonstrates the use of the SysTick timer. I highly recommend reviewing this example to understand its functionality, particularly the "SysTick_Config" function where the SysTick timer is configured.
For additional information, please refer to Chapter 29, titled "System Tick Timer," in the Reference Manual (RM).
BR
Habib