Hi, I would like to set an interrupt which will read from more than one channel from the ADC. I manage to form an interrupt but I can only read from one channel. How can I do this with more than one channel? I am using S32K144
Hi,Each ADC channel can be configured for an interrupt when the corresponding COCO bit is set (SC1n[AIEN = 1]).Conversions can be triggered either by SW or HW triggers.Only SC1A support SW triggers though and you would need to wait until the conversion completes by polling the SCIA COCO bit or using the interrupt on that channel to trigger the next conversion on the channel.However, you can use HW triggers (from PDB for example) on multiple channels, enable one ADC interrupt on the completion of the last channels and read all the results (clear COCO bits) at once in this interrupt routine.The below example utilizes DMA instead of interrupts, but it shows the use of it.Example S32K144 PDB ADC trigger DMA ISR S32DS
Retrieving data ...