[LPC4357] Enable RTC and show the time on display panel using emWin function, and then the system crashed.

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

[LPC4357] Enable RTC and show the time on display panel using emWin function, and then the system crashed.

773 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wangchainh on Tue Apr 02 02:07:07 MST 2013
Hi guys,
I have a question about using the rtc and emwin.
Software:
Code base on LPC open 1.01.
emWin 518 1.00
Hardware:
LPC4357 Demo board

I modified the project hello_world, and show some strings or show a jpg/gif/bmp on display panel. It is no any problem. (Path: ..\lpcopen\applications\lpc18xx_43xx\examples\emWin\emwin_hello_world)

I modified the project hello_world, and enable RTC. RTC can work well. I can print the time via USARE 3. (RTC code copy from .. \lpcopen\applications\lpc18xx_43xx\examples\periph\periph_rtc)

But, I enabled the RTC and then called any emWin function. The system will crash.
Somebody know why?

PS: hello_world have enabled two framebuffer.
标签 (1)
0 项奖励
回复
1 回复

671 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lturcotte on Thu Jan 16 15:50:27 MST 2014
I encounter a similar problem
For the benefit of others, here is my solution.

From LPC open, file: clock_18xx_43xx.c

the Chip_Clock_RTCEnable was reprogramming the CLK0 pin
CLK0 is used for the SDRAM interface.

/* Enable RTC Clock */
void Chip_Clock_RTCEnable(void)
{
LPC_CREG->CREG0 &= ~((1 << 3) | (1 << 2));/* Reset 32Khz oscillator */
LPC_CREG->CREG0 |= (1 << 1) | (1 << 0);/* Enable 32 kHz & 1 kHz on osc32k and release reset */
// conflict with SDRAM clock pin, do not reprogram clock pin
//LPC_SCU->SFSCLK[0] = 1 | (0x3 << 2);/* function 1; CGU clk out, pull down */
}

0 项奖励
回复