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?