How to read gpio value in s32v234 uboot

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

How to read gpio value in s32v234 uboot

3,959件の閲覧回数
zhaocq
Contributor II

hi NXP,

          s32v234 uboot  stage, we want to use Port PB5 and PB6 as GPIO function, we want to simulate i2c. Now we can set PB5 and PB6 to output high and low, set as below:

writel(config , SIUL2_MSCRn(19));
writel(value_off, SIUL2_GPDOn(SIUL2_GPDO_for_GPIO(19)));

writel(config , SIUL2_MSCRn(20));
writel(value_off, SIUL2_GPDOn(SIUL2_GPDO_for_GPIO(20)));

through the wavelet, we can get high and low. 

Also we need to read the data input, I set below codes, but still can not read  correct value.

u32 config1 = (0<<0 | 1<<19);

writel(config1 , SIUL2_IMCRn(273));
get_value = readl(SIUL2_IMCRn(273));
printf("Board: test_gpio_i2c get_value=%x\n",get_value);

Could you tell me how to set the input and read the input value? Thanks in advances!

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 返信

3,580件の閲覧回数
KushalShahNXP
NXP Employee
NXP Employee

Hi,

 

We have stopped supporting this community page. But we still support S32V2 questions using our ticketing system.

Please create the request at www.nxp.com/support using Support Requests option. Our experts will help you.

 

Thank you for understanding.

 

Regards,

Kushal

0 件の賞賛
返信