i.MX6SDL GPIO unexpected behavior.

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

i.MX6SDL GPIO unexpected behavior.

Jump to solution
874 Views
satoshishimoda
Senior Contributor I

Hi community,

Our partner met a problem when I use a GPIO function of i.MX6.

Value of GPIO_DRI was cleared when I switched GPIO_GDIR.

Initialization flow was the following procedure.

① set value of GPIO_DR

② set value of GPIO_GDIR

But I set a port to 1 (high) and set GPIO_GDIR to 1 (output) of after that, then GPIO_DR value switched to 0 and it output low (our partner want to high signal).

As long as I read datasheet, I think that the above behavior doesn't occur.

Do you know the reason why the above behavior occurs?

Also, if I set value of GPIO_GDIR before I set value of GPIO_DR(29.4.2.2 GPIO Write Mode in i.MX 6Solo/6DualLite Applications Processor Reference Manual Rev.1, 04/2013), I think that a pulse exists for a moment.

In this case, Do you know how to prevent the pulse?

Best Regards,

Satoshi Shimoda

Labels (2)
Tags (1)
0 Kudos
1 Solution
611 Views
Yuri
NXP Employee
NXP Employee

  Please try to enable GPIO module clocks before GPIO initialization.

//=============================================================================  
// Enable all clocks (they are disabled by ROM code)  
//=============================================================================  

setmem /32    0x020c4068 =    0xffffffff   

setmem /32    0x020c406c =    0xffffffff   

setmem /32    0x020c4070 =    0xffffffff   

setmem /32    0x020c4074 =    0xffffffff   

setmem /32    0x020c4078 =    0xffffffff   

setmem /32    0x020c407c =    0xffffffff   

setmem /32    0x020c4080 =    0xffffffff   

setmem /32    0x020c4084 =    0xffffffff


Have a great day,
Yuri

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

View solution in original post

3 Replies
612 Views
Yuri
NXP Employee
NXP Employee

  Please try to enable GPIO module clocks before GPIO initialization.

//=============================================================================  
// Enable all clocks (they are disabled by ROM code)  
//=============================================================================  

setmem /32    0x020c4068 =    0xffffffff   

setmem /32    0x020c406c =    0xffffffff   

setmem /32    0x020c4070 =    0xffffffff   

setmem /32    0x020c4074 =    0xffffffff   

setmem /32    0x020c4078 =    0xffffffff   

setmem /32    0x020c407c =    0xffffffff   

setmem /32    0x020c4080 =    0xffffffff   

setmem /32    0x020c4084 =    0xffffffff


Have a great day,
Yuri

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

611 Views
satoshishimoda
Senior Contributor I

Hi Yuri,

> setmem /32    0x020c4084 =    0xffffffff

There is no register on 0x020c4084.

Was this typo? Should we set 0xffffffff to 0x020c4088 (CCM_CMEOR register) instead of 0x020c4084?

Best Regards,

Satoshi Shimoda

0 Kudos
611 Views
Yuri
NXP Employee
NXP Employee

Yes, "setmem /32    0x020c4084 =    0xffffffff"  should be removed.

Regards,

Yuri.