Pinmux modification at runtime

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

Pinmux modification at runtime

Jump to solution
1,587 Views
JeromeBaron
Contributor II

Hi everyone,

I'm working on a platform with a iMX28 that runs Linux. I would like to know if it's allowed to change the pinmux at runtime, while in the Linux.

My goal is to use a SPI port, program a device, then change those IO to GPIO after the programmation.

Can I do this? How?

Regards,

Jerome

0 Kudos
1 Solution
1,186 Views
JeromeBaron
Contributor II

It appears the answer is a simple memory write to the CPU registers. I have found a small application(imxregs) in amadeus distribution to access those registers.

View solution in original post

0 Kudos
2 Replies
1,187 Views
JeromeBaron
Contributor II

It appears the answer is a simple memory write to the CPU registers. I have found a small application(imxregs) in amadeus distribution to access those registers.

0 Kudos
1,186 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jerome

seems not, since linux spi driver will own pins. To rmmod driver one needs

to be administrator with root permissions.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos