MQX ADC Driver for Vybrid (M4)

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

MQX ADC Driver for Vybrid (M4)

1,781 Views
danieloak
Contributor I

Hi,

I want to use the M4 core of the Vybrid to sample sample voltage(ADC0) and current(ADC1) signal at the same time with fixed frequency (with PDB). Can I use lwadc? If not is there an implementation of adc driver for Vybrid? In io/adc folder there is only kadc that is adc driver for kinetis.

Thanks

Daniel

Tags (2)
0 Kudos
3 Replies

338 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi Daniel,

After skimming through the lwadc driver it does not implement the PDB as a trigger.

You may use as reference the kinetis driver to implement your own ADC-PDB configuration thanks to the architecture similarities.

Best Regards,

Alejandro

0 Kudos

338 Views
danieloak
Contributor I

Hi Alejandro,

First of all thanks for the answer. As you suggested I started the implementation of ADC-PDB configuration for Vybrid based on kinetis driver and I have some questions about PDB.

Is it possible to trigger ADC0 and ADC1 modules at the same time? I would like to use ADC0.8 to sample voltage and ADC1.8 to sample current.

Where can I setup ADC trigger source for ADC modules?

Thanks

0 Kudos

338 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Yes, you should be able to get both ADCs conversions at the same time with the PDB.

Please refer to the next discussion:

Query on PDB configuration for hardware tigger support

There you will find a code snippet to get both ADC modules triggered by the PDB. To get both ADCs triggered at the same time you should configure the PDB channels with the same delay.

Best Regards,

Alejandro

0 Kudos