LPC55S28 read SYST_CVR register data is always 0

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC55S28 read SYST_CVR register data is always 0

440 次查看
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.

 

标签 (2)
0 项奖励
回复
1 回复

373 次查看
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 项奖励
回复