I am trying to test ADC example on NHS3152. The code is from
Example 3 - Single-shot Analog-to-Digital Conversion without IRQ
-------------------------------
int adcInput;
Chip_ADCDAC_Init(NSS_ADCDAC0);
Chip_ADCDAC_SetMuxADC(NSS_ADCDAC0, ADCDAC_IO_ANA0_5);
Chip_ADCDAC_SetInputRangeADC(NSS_ADCDAC0, ADCDAC_INPUTRANGE_WIDE);
Chip_ADCDAC_SetModeADC(NSS_ADCDAC0, ADCDAC_SINGLE_SHOT);
Chip_ADCDAC_StartADC(NSS_ADCDAC0);
while (!(Chip_ADCDAC_ReadStatus(NSS_ADCDAC0) & ADCDAC_STATUS_ADC_DONE)) {
; /* Wait until measurement completes. For single-shot mode only! */
}
adcInput = Chip_ADCDAC_GetValueADC(NSS_ADCDAC0);
---------------------------------
However, it seems that ReadStatus never gets out of while loop. I wonder if I miss something here …
Hi pingmei
In this community space we cover MATLAB related questions. For your issues is better to look for help in this space: NFC | NXP Community
Unfortunately, i can't move your question there, therefore you need to create another issue there.
Thank you!
Daniel