Toggle i/o bit on iMx6 .. ??

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

Toggle i/o bit on iMx6 .. ??

Jump to solution
1,023 Views
johnballance
Contributor III

To toggle an i/o bit on iMx6 I believe i need to:

1: ensure I can write to GPIO block

2: set the pad ctl register to e.g.0x1b0b0

3: set the pad mux register to the correct alt to route the bit there

4: set relevant gpio dir bit to 1

5: write 1 or 0 to the right gpio data register bit

have I missed anything, e.g. clock enable? or anything else?

Thanks

John

Labels (4)
0 Kudos
1 Solution
480 Views
Raybiztech
Contributor V

Hi John,

     In case of imx6 your prediction is almost right.

To write into GPIO you have to

1. Configure IOMUX to select GPIO mode (Via IOMUXC).

2. Set GPIO direction

3. Write value into corresponding data register.

For more information you can read Chapter 28: General purpose Input/output

in IMX6DQRM pdf.

View solution in original post

0 Kudos
1 Reply
481 Views
Raybiztech
Contributor V

Hi John,

     In case of imx6 your prediction is almost right.

To write into GPIO you have to

1. Configure IOMUX to select GPIO mode (Via IOMUXC).

2. Set GPIO direction

3. Write value into corresponding data register.

For more information you can read Chapter 28: General purpose Input/output

in IMX6DQRM pdf.

0 Kudos