iMX93 read ADC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX93 read ADC

13 Views
Vitus
Contributor I

Try to read the ADC of the iMK93, using the M33 core, the first ADC. But I do not get a value

Pin-mux:

in the fsl_iomuxc.h I do not find a #define IOMUX so I assume this is a not muxed pin. and did not do anything here. Maybe this is my mistake

Initialization:

 ADC1->MCR = 
SAR_ADC_MCR_OWREN(1) //overwrite values
| SAR_ADC_MCR_MODE(1) //Scan continuous
| SAR_ADC_MCR_NSTART(1) //start scanning
;

I init as above. This is basically a value 0xA1000000. Interestingly, the bit NSTART resets itself after writing, even according to the CPU manual should stay set when in Scan mode

cyclical (all 5msec or so):

uint32_t steps = SAR_ADC_PCDR_CDATA(ADC1->PCDR[0]); //AD 0

the value "steps" is always zero

summary:

does not run. This may be a wakeup at init needed or the pins are muxed but it is somehow hidden or I messed up the registers,. Did not find an example in the SDK. Does anyone has a quick help or a link to an example?

 

0 Kudos
Reply
0 Replies