LPC1788FBD208 after set PCONP.PCLCD=1, read LCD_CTRL or other lcd regs cause HardFault,
busfault addr:0x20088018
and write lcd regs no effect, code is below:
int main(void)
{
LPC_SC->PCONP |= CLKPWR_PCONP_PCLCD;
LPC_LCD->CTRL = 1 // no effect
LPC_LCD->CTRL &= ~(1<<11); // casue HardFault
Solved! Go to Solution.
Hi Hai,
Yes, your problem is really like the LCD module is missing.
If you buy it in Tmall... the quality can't be guaranteed.
Please buy the chip in the proper channels, you can find the distributors from this link:
http://www.nxp.com/zh-Hans/webapp/sps/site/distributor.sp?orderablePartNum=LPC1788FBD208,551
Wish it helps you!
Any question or updated information, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi hai nie,
I have test the LCD on my IAR_1788 board, when I test your three lines code on my side, it works ok:
So I think it caused by your code, you can debug your code, and check the LCD_CTRL register, when configure it, whether the register has been the data which you want.
You can refer to the code from this link:
Besides, I also attach one IAR LCD project for your reference.
Please use these LCD code and test it on your side.
If you still have problem, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hi, zhou!
thanks for your answer.
1. My lpc1788 board is my own design ! I also attach scheme (panel.pdf) for reference.
2. I debug your project on my board , error no change.
3. I add three line code in LCD_Demo project from NXP package.
change OSC to 24M(my board's config), and change target to lpc1788.
recompile, start debug. error no change.please note LCDC registers in IAR IDE, no value!!!
I think error maybe in my hardware design, but I don't known where.
maybe rtc? reset ?
please check my scheme design.
Hi hai nie,
It seems your LCD module is not powered on or no clock.
Please check the PCONP->PCLCD regester, did you really open it?
About the clock, we can get that the default the LCD clock is from CCLK, so please checking yoru configuration, whether the CCLK have clock or not?
Please check these points on your side, if you are using the OSC, please also check your OSC, whether it is oscillating in your hardware.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Zhou !
I think the chip lpc1788FBD208 is the reason , This chip is buy from Tmall ( tmall.com), and maybe is remarked!
Maybe this chip is not really LPC1788, and don't have LCD function.I will buy new chip to test.
And will tell you test result,
Thank you very much!
Hi Hai,
Yes, your problem is really like the LCD module is missing.
If you buy it in Tmall... the quality can't be guaranteed.
Please buy the chip in the proper channels, you can find the distributors from this link:
http://www.nxp.com/zh-Hans/webapp/sps/site/distributor.sp?orderablePartNum=LPC1788FBD208,551
Wish it helps you!
Any question or updated information, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi, Zhou
LPC1788 LCD problem is the chip is remarked, thank you for your help,
and now I have another problem about usb device:
1. attach file is my usb scheme, and my design does NOT use VBUS ,SoftConnect, USB_LED pin. is it right?
2. when I run lpc177x.lpc178x.cmsis.driver.library_2012.8.13\Examples\USBDEV\USB_VirtualCom, then plug usb into PC,
then windows 7 's device manager show UNKNOWN DEVICE, and PID VID all zero.
3. below is main() function, demo code unchanged
/*
Hi Hai nie,
Normally, one post for one topic question.
For the new USB question, please create a new post, then we will reply you in your new post.
This method will also help the other customer to find the similar question easily.
So, please create a new case about the USB, and if your problem about the LCD is solved, please mark the correct answer to close this post.
Thanks a lot for your understanding!
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------