We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear all,
I have just switched from LPC1768 to LPC1788 and everything is just messed up. I had used DAC unit of LPC1768 without any problems, but for LPC1788, DAC (the one which is supposed to be easiest of all units to run and use) gives me a hard time here.
This is how I initialize the DAC unit:
void Init_DAC() { LPC_DAC->CNTVAL = 600; LPC_DAC->CTRL = 0x0C; // Time-out operation is enabled, DMA burst request is set up LPC_IOCON->P0_26 = (0x02)|(1<<16); }
I have commented out all other codes in the application. When I call this function from main, it fires up a hard fault exception.
Do you have any idea what is wrong with these three lines of code?
Have you enabled clocking, and since you specify DMA - have you turned on power to the DMA?2
I have checked the clock of all relative units and all of them are fine. There must be another problem. I am still working on it.