ok to reconfig gpio continuously during program execution?

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

ok to reconfig gpio continuously during program execution?

152 次查看
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 回复数

108 次查看
azone
Contributor I

Ok thank you.

0 项奖励
回复

124 次查看
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 项奖励
回复