adc driver on i.mx28

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

adc driver on i.mx28

2,755件の閲覧回数
mehmet
Contributor I

Hi,

I need to read adc value of lradc channel 0. Is there any sample code? Or how can I do it?

 

Thanks

Mehmet

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

1,972件の閲覧回数
mehmet
Contributor I

I have i.mx28 evk and use linux. 

 

I checked keyboard driver,

I used below functions for init;

hw_lradc_init_ladder(LRADC_CH1, LRADC_DELAY_TRIGGER_BUTTON, 200);   hw_lradc_set_delay_trigger_kick(LRADC_DELAY_TRIGGER_BUTTON, !0);

 

But I couldn't understand how can I read adc value. In keyboard driver there 2 functions,

raw_button = __raw_readl(devdata->base + HW_LRADC_CHn(devdata->chan)) & BM_LRADC_CHn_VALUE;

 vddio = hw_lradc_vddio();

Which one of them should I use?

 

Thanks.

Mehmet.

 

 

 


0 件の賞賛
返信

1,972件の閲覧回数
daiane_angolini
NXP Employee
NXP Employee
I know there is some ADC code into unit_test. You can take a look if it is enough for you.
0 件の賞賛
返信

1,972件の閲覧回数
AhmetYUCE
Contributor II
"resistor divider" , sorry for mistype
0 件の賞賛
返信

1,972件の閲覧回数
AhmetYUCE
Contributor II
Check out mxs keyboard driver in iMX28 BSP. It uses a resistor driver as button(s).
0 件の賞賛
返信

1,972件の閲覧回数
daiane_angolini
NXP Employee
NXP Employee
Please, tell us which is your board, and which is your OS
0 件の賞賛
返信