Hello,
I am looking for bare metal example to read ADC on imx7d. I am hoping there is example that is simple like:
{
use software mode
auto calibrate
start conversion
wait for conversion
read result
}
I have found example for imx6 which is similar but ADC registers appear to be quite different on imx7d.
Is there good (small) example that could be used in uboot early board init? That does not use interrupts for example.
Thank you.
Ron.
已解决! 转到解答。
Hello,
In the following FreeRTOS BSP you can find an ADC example available in: C:\nxp\FreeRTOS_BSP_1.0.1_iMX7D\examples\imx7d_sdb_m4\driver_examples\adc_imx7d after installing it.
Please download it from the following link: https://www.nxp.com/webapp/Download?colCode=FreeRTOS_iMX7D_1.0.1_WIN&appType=license
Hope it helps!
BR,
Ivan.
Ivan - thank you so much for your response.
I have looked at that one - however it uses an interrupt handler, etc. I was about to start using it as a base and adapting it for my use in a polling model - when I decided to ask here in the forum if anyone had a simple 10 line ADC read example that might be simpler. I was really hoping to find a 'start conversion, wait for result, read result' type thing.
If none are out there then I will definitely use this one and try to adapt.
I basically need to read one voltage in early board init so that I can toggle a control line once one of my rails comes up.
Again - thank you for your suggestion.
Ron.
Hello,
You are very welcome my friend. Unfortunately, this is the only example available for ADC so far which you may take as a reference for your custom implementation.
Have a nice weekend!
BR,
Ivan.
Hello,
In the following FreeRTOS BSP you can find an ADC example available in: C:\nxp\FreeRTOS_BSP_1.0.1_iMX7D\examples\imx7d_sdb_m4\driver_examples\adc_imx7d after installing it.
Please download it from the following link: https://www.nxp.com/webapp/Download?colCode=FreeRTOS_iMX7D_1.0.1_WIN&appType=license
Hope it helps!
BR,
Ivan.