Hi Thomas,

If you structure the driver like any of the other ADC drivers in tree you
should be able to reference px4_arch_adc_init and px4_arch_adc_sample

from
https://github.com/PX4/Firmware/blob/master/platforms/nuttx/src/px4/nxp/im
xrt/adc/adc.cpp to get the required logic.

To fill in the meat, but you will have to do it in nuttx style using the
{get|set}reg32 calls.

David

-----Original Message-----
From: Thomas Axelsson [mailto:thomas.axels...@actia.se]
Sent: Tuesday, September 15, 2020 2:55 AM
To: dev@nuttx.apache.org
Subject: i.MX RT 1060 ADC

Hi,

I'm looking into using the ADC on IMXRT 1060. I have found imxrt_adc.h and
some examples in nuttx-apps using /dev/adcXX. However, it seems that the
actual functionality is not yet implemented for IMXRT.

So I'm looking into implementing this driver, based on e.g. lpc17_40_adc.c
(diffing all *_adc.c files turned up almost no differences). I tried
grepping for some register names to see if the IP block is already
implemented for another chip, but without luck.

I'm sending this e-mail to see if someone else is already working on the
same thing. I did see that imxrt_adc.h has gotten some updates.

Thomas Axelsson
SW Developer
ACTIA Nordic AB (part of ACTIA Group)

Mail: thomas.axels...@actia.se<mailto:thomas.axels...@actia.se>
Web: www.actia.se<http://www.actia.se/>

Reply via email to