In Processor Expert, I'm using the ADC_LDD Component with DMA1 for a FRDM-K64F. I selected PDB0 as trigger since I wanted to use the external trigger (PDB0_EXTTRG pin), but I got no samples. Using method AD0_StartLoopMeasurement( ) instead of AD0_StartLoopTriggeredMeasurement( ) (i.e. an untriggered data acquisition) I get 256 samples in my input buffer, taken at back-to-back conversion rate. So, everything works but the trigger. I turned on the PDB0 interrupt and set Debug breakpoint and sure enough the PDB counted down and the ADC should have seen the trigger. I thought the PDB might be the problem and selected the PIT timer as the ADC trigger, and even though the PIT interrupt can blink an LED, the ADC never gets a trigger. I initialized with AD0_Init(). I have done a similar setup on the TWR-K20D50M chip (simpler ADC), and had no problems. Either I'm missing how to enable the trigger or I have a defective device. Any hints?
Hi Mark,
Have you checked that processor expert is configuring the registers with the desired values, you can compare the registers values of the 2 applications you have developed (K64 and K20), you could be missing something to set in PEx? I would start trying an application just with the ADC being triggered externally (without DMA).
Regards,
Carlos
Also, comparing registers doesn't help since the architectures are different. The K20 works by using the EXTRG which directly triggers the ADC, and this option is not available on the K64F.
No, the problem is not with the DMA setup, since it uses the DMA correctly when I call the AD0_StartLoopMeasurement( ). There's only problem when using AD1_StartLoopTriggeredMeasurement.( ). With earlier MCUs PEx had a selection of EXTRG, so any external signal or MCU timer source (using a jumper wire on the board) could be used to trigger the ADC samples. But, the K64F (or at least the PEx support for K64) forces you to pass the trigger signal thru the PDB. So comparing code doesn't help because I can't get the trigger thru the PDB on the K20D72M either (but I can select EXTRG on the K20 so it all works OK).
I'll eventually try "poking" all the register bits to set up PDB bypass, but am going ahead with using the K20D72M for this project.