Hello,
I'm working with the imxrt1062 and trying to measure 7x pins on ADC1 and 6x pins on ADC2 using ADC_ETC. The application is built from the MBDT/SDK Example for ADC_ETC.
It can be replicated on the EVK.
When previously tested, ADC_Polling, rather then ADC_ETC delivered the expected results.
I've tried to follow the info here but haven't managed to resolve my issue:
https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Trigger-ADC-with-PWM-on-IMX1064/td-p/1273086
https://www.nxp.com/docs/en/application-note/AN12214.pdf
https://community.nxp.com/t5/i-MX-Processors/ADC2-and-ADC-ETC-not-working-rt1024-evk/m-p/1336318
https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/ADC-ETC-sync-mode-questions-on-rt1050/m-p/844735
My issue is that several pins measure only noise, ADC2.IN.1 and ADC2.IN.2.
I can measure at the pins using a multimeter and they're a stable 3.3V. I can measure the "incorrect pins" with a neighbouring ADC (eg. Fuel_Level) and the values are correct. I can flash the code to the EVKB_1062 and see the same issue on the same channels so I'm sure that the issue isn't in the hardware.
My setup with the best results are:
ADC1:
ADC2:
ADC_ETC:
I see no improvement or no measurements at all if I:
- ADC2: Set Trigger source to CH1_XBAR_TRG0 (Trigger Group 4)
- Remove "Bypass TSC"
- Change my PIT_Timer (1ms, 10ms, 100ms)
- Remove Back2Back and set delays and intervals
- Set ADC1_Channels as all Group 0 and ADC2_Channels as Group 1
- Change priorities
- Set up sync mode with ADC1 and Trigger Group 0 and ADC2 as Trigger Group 4
Here's the setup in Simulink to measure:
What am I missing? How can the issue be fixed to measure correctly all ADC1 and ADC2 channels.
Attached my Config.mex and Config Folder. I can supply my whole program.