Hi all,
For an PRU application I'm doing I need to change the MUX for a pin from MODE6 (gpo) to MODE7 (gpi) and viceversa, the reson is because I've something like this:
- http://pastebin.com/iL4kwJ9P
On transmit mode PRU0_PRU_R30_15 (TXD) needs to be configured as GPO (MODE6) but on receive mode needs to be configured as Input (or high impedance) MODE7 to not force RX line. I tried to do this by writing directly to the padconf register ( conf_gpmc_ad13, 0x44e10834 ) but seems writting to this register has no effect. So I tried to do the same using devmem2 in userspace, and I obtained the same result, writting to 0x44e10834 has no effect. For example the following code just tries to change from INPUT | MODE7 (0x2f) to OUTPUT | MODE7 (0x07) but doesn't work.
# ./devmem2 0x44e10834 /dev/mem opened. Memory mapped at address 0xb6f86000. Value at address 0x44E10834 (0xb6f86834): 0x2F # ./devmem2 0x44e10834 b 0x0f /dev/mem opened. Memory mapped at address 0xb6fd6000. Value at address 0x44E10834 (0xb6fd6834): 0x2F Written 0xF; readback 0x2F # ./devmem2 0x44e10834 b 0x0f /dev/mem opened. Memory mapped at address 0xb6f37000. Value at address 0x44E10834 (0xb6f37834): 0x2F Written 0xF; readback 0x2F
I remember do this with OMAP3, is AM335x different in that aspect?, need I to do something else to be able to change the mux in runtime ?
Thanks in advance.