i.MX6SDL GPIO unexpected behavior.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX6SDL GPIO unexpected behavior.

ソリューションへジャンプ
2,088件の閲覧回数
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

ラベル(2)
タグ(1)
0 件の賞賛
返信
1 解決策
1,825件の閲覧回数
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!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

3 返答(返信)
1,826件の閲覧回数
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!
-----------------------------------------------------------------------------------------------------------------------

1,825件の閲覧回数
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 件の賞賛
返信
1,825件の閲覧回数
Yuri
NXP Employee
NXP Employee

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

Regards,

Yuri.