Hello,
I am putting together an app that wants to perform ADC conversions based on a timer at a steady state, modest rate (32K samples/sec). It is not clear from the ConfigTools how to set this up. Hardware platform is LPCXpresso 55S36. MCU Expresso IDE is v11.9.0.
I am using CTIMER1 for ADC trigger generation, ADC0 for conversion, and DMA0 for data movement. Some of the items and features are clear. Some (the signal and trigger routing) are not. Also, though there is an example, the example appears not to have a MEX file (so, unable to compare generated code), and it converts 3 values when a character is entered, which is not terribly useful.
1) Is there a better example of timer/ADC/DMA?
2) Though ADC can trigger on CTIMER1 match 3, the config tool gives a warning on CTIMER1 unless the match output is directed to a real pin. Is this necessary? Nothing about the processor data sheet seems to imply routing to a real pin is needed.
3) The ADC0 FIFO ready flag (table 400 in LPC553xRM) indicates that the FIFO ready signal can generate a DMA request. However, this signal does not appear in the list of signals under ADC0, TRIG 21 (21 is selected automatically by the tool when configuring the ADC FIFO operation). How is this connection made?
4) Also table 400, ADCn_TCOMP can generate an interrupt but not a DMA request. Why does the config tool list ADC0_TCOMP0 and ADC1_TCOMP0 as an option for triggering the DMA??
5) The examples do not include MEX files. Were they generated with the MEX Config tools?
Best regards,
TRC
Thank you for the response.
I have reviewed the example you referenced.
It does not show how to trigger the DMA from the ADC, (nor how to trigger the ADC from a timer). Rather, it polls the ADC for completion, and starts the DMA through software. This is not useful in the application we have.
Is there a better example, showing triggering? And, can you address questions 3 and 4 in the original request?
Thank you and Regards,
Tim
Hello @TRCooper
Sorry it seems there is no other better example than this. You can use configuration tool to configure.
Q3: ", this signal does not appear in the list of signals under ADC0"
->> How about refer to below picture:
Q4> On my side, there is no ADC0_TCOMP0 under DMA request list:
BR
Alice
Hello @TRCooper
Recommend you first refer the below thread, includes ADC example based on LPC55s69.
https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/ADC-multi-channel-sampling-and-DMA-trans...
About MEX file, if not use Configuration tool to configure, there is no .mex file.
About other question, if you still have after refer to above example, feel free to contact me. thanks.
BR
Alice