IMX6: Unable to use DI0_PIN2 as GPIO4[18]

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

IMX6: Unable to use DI0_PIN2 as GPIO4[18]

868 Views
jwatts
Contributor I

On our custom IMX6 Dual board, I seem to be unable to control GPIO4[18] (on pad DI0_PIN2, pin N25). To rule out any strange interactions with Linux I'm stopping the boot process in the bootloader (barebox) and using JTAG to directly configure the IOMUX and GPIO registers. So far, I've been unable to get the pin to change from outputting high to low. There are no external pull-ups on this line, it is directly connected to the REn input of an RS485 transceiver (I don't this it contains any internal pull-ups).

This is what I believe should be the correct register settings (confirmed working on GPIO4[19] which goes to the transceiver's DE input):

  • SW_MUX_CTL_PAD_DI0_PIN2 (0x20E0164) = 0x5 (MUX_MODE = ALT5)
  • SW_PAD_CTL_PAD_DI0_PIN2 (0x20E0478) = 0x1B0B0 (HYS, PUS=100K pull-up, PUE, PKE, DSE=40ohm, SPEED=100mhz, SRE=slow)
  • GDIR[4] (0x20A8004) = 0x40000 (GDIR18 = Output)
  • DR[4] (0x20A8000)= 0xE3FA7F00 (DR18 = Low)

With the above, the pin stays at VCC despite the GDIR and DR registers. Nor does changing PUS to 100K pull-down have any effect.

Where else can I look/investigate to try and figure out what's missing?

Labels (1)
0 Kudos
4 Replies

590 Views
jwatts
Contributor I

No luck with the bare-metal SDK. Also, while I thought I could control GPIO4[19], it seems that pin too stops responding. This morning when I sat down I was able to get several transitions from GPIO4[19] (using JTAG) but after attempting the same on GPIO4[18] again neither pin is now changing.

Is there any possibility that the display interface or another alternate mux of this pin has some semblance of remaining control, despite not being muxed? IE: Could a lack of enabled clock to DI0 cause the logic state of the pin to become stuck?

0 Kudos

590 Views
igorpadykov
NXP Employee
NXP Employee

when configured as GPIO, this pad should not be affected by

IPU settings.

~igor

0 Kudos

590 Views
igorpadykov
NXP Employee
NXP Employee

Hi Josh

one can one can check if correct address is used for GPIO4,

and try to use it without OS, just with SDK

i.MX 6Series Platform SDK  : Bare-metal SDK

1.jpg

Best regards

igor

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

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

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

0 Kudos

590 Views
jwatts
Contributor I

Oops: Edited OP to include addresses of GPIO registeres.

I'll give the PDK quick try, thanks!

0 Kudos