lpcware

lpc1778 adc bust read & dma lli problem

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by novemer on Thu Mar 06 07:56:22 MST 2014
hi all:
  days ago,i used lpc1778 internal adc bust read with dma transfer , but  there is a problem that the data in ADGDR can not be used in bust mode.so i try to use dma lli transfer.but it does not work well. here is the setting:for exemple,ch0,2,4 will be used
  1, update the lli space, there are 3*4 word lli reg:1st source addr is AD0DR,1st dst addr is ram space 0x20002000,1st lli is addr of 2nd lli,ist control is 0xxx;2nd source addr is AD2DR,2nd ds addr is ramspace 0x20002004,2nd lii is addr of 3rd lli,2nd control is 0x00;3rd source addr is AD4DR,3rd dst addr is ram space 0x20002008,3rd lii is 0x0,3rd control is 0xxx;
  2, disable adcintIRQ;
  3,enable dmaintIRQ;
  4, set adc->int is 0x100(enable global int only);
  5, set adc->cr low 8 bits is 0x15(0001 0101);
  6, enable adc bust;

  after that,run.when the first 3 channel convertion finished, the program go to dma irq.but the data in 0x20002000-0x20002008 is not correct.the data is 0x82xxxxxx,0x82xxxxxx,0x84xxxxxx,just like data from ADGDR.
  later i will attach the code.

Outcomes