imx7d read ADC in uboot early board init

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

imx7d read ADC in uboot early board init

跳至解决方案
1,168 次查看
ronhume
Contributor I

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.

 

0 项奖励
回复
1 解答
1,156 次查看
IvanRuiz
NXP Employee
NXP Employee

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.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,152 次查看
ronhume
Contributor I

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.

 

0 项奖励
回复
1,138 次查看
IvanRuiz
NXP Employee
NXP Employee

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.

0 项奖励
回复
1,157 次查看
IvanRuiz
NXP Employee
NXP Employee

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.

0 项奖励
回复