LPC55S28 read SYST_CVR register data is always 0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC55S28 read SYST_CVR register data is always 0

433 Views
MHY_0878
Contributor I

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.

 

Labels (2)
0 Kudos
Reply
1 Reply

366 Views
Habib_MS
NXP Employee
NXP Employee

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

0 Kudos
Reply