Read more than one channel from ADC using interrupts - S32K144

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Read more than one channel from ADC using interrupts - S32K144

1,672件の閲覧回数
spolychronis
Contributor I

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

タグ(2)
0 件の賞賛
返信
1 返信

1,518件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

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 

Regards,
Daniel

0 件の賞賛
返信