ok to reconfig gpio continuously during program execution?

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

ok to reconfig gpio continuously during program execution?

151件の閲覧回数
azone
Contributor I

This may be a silly question but something I've never done before. I have a need to reconfig some data output pins as inputs (or alternatively disable the pins by reconfiguring the mux). Basically every time the program needs to write data I need to 'open' the data pins while I update an address. This is because I need to use the PinWrite function to set a 4-bit address, and if I don't hide the data outputs the data will be latched after every PinWrite (instead of after the entire address is set). This could be solved in hardware but the hardware can't be changed at this point. I added the reconfig to a DataWriter function and it works fine, but is this something that is generally acceptable, to reconfigure pins somewhat continuously during program execution?

the product is MIMXRT1062

0 件の賞賛
返信
2 返答(返信)

107件の閲覧回数
azone
Contributor I

Ok thank you.

0 件の賞賛
返信

123件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @azone ,

Thanks for your interest in NXP MIMXRT series!

First of all, while this is a less than elegant implementation due to your hardware limitations, the RT Series MCUs can support you in doing this.

Also, the GPIO's registers have a SION bit that holds the GPIO outputs along with an input loop, not sure if this feature would be helpful in your usage scenario.

Gavin_Jia_0-1717150542455.png

 

Best regards,
Gavin

0 件の賞賛
返信