ok to reconfig gpio continuously during program execution?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ok to reconfig gpio continuously during program execution?

150 Views
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 Kudos
Reply
2 Replies

106 Views
azone
Contributor I

Ok thank you.

0 Kudos
Reply

122 Views
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 Kudos
Reply