i.MX27 can't disable USB_OC_B(PB24/E22 pin, over current)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

i.MX27 can't disable USB_OC_B(PB24/E22 pin, over current)

跳至解决方案
678 次查看
torus1000
Contributor V

Hi,

I needed one more GPIO pin then I modified PB24(E22) pin mux but USB over current detected when I cleared PB24.

Why did i.MX27 usb host detect over current in spite of gpio inuse with PTB_GIUS[24] set

or disable all _OC_B bits (b24,16&8:OPM,H2PM&H1PM) of USB_CTRL set?

What's wrong with my above register setting?

Is there any software to switch hidenly to detect usb over current?

In addition, following case cause USB over current too.

(1)to 0x1001_5110 (PTB_ICONFA2), write 0xFFFF_F000 then write 0xFFFE_F000 next #Aout 1->0

  to 0x1001_5118 (PTB_ICONFB2), write 0xFFFF_F555 then write 0xFFFE_F555 next #Bout 1->0

(2)to 0x1001_512C (PTB_ICR2), write 0x0000_0515 then write 0x0001_0515 next #rise->fall

(3)to 0x1001_5138 (PTB_GPR),  write 0x0000_0000 #primary

  to 0x1001_5120 (PTB_GIUS), write 0x01BF_FFF3 #gpio inuse =1

  to 0x1001_5100 (PTB_DDIR), write 0x0180_03F0 #output

Can anyone help me?

Thanks.

标签 (1)
0 项奖励
回复
1 解答
480 次查看
Yuri
NXP Employee
NXP Employee

Hello,

  Really USB_OC interrupts cannot be masked and the Reference Manual is incorrect regarding OPM,
H2PM, H1PM bits - they do not mask Over Current events. The problem is that basically USB_Overcurrent
is an input signal, that can only be used for USB function, not for GPIO function, since  corresponding USB

interrupt cannot be disabled. 

  Although USB_OC may be used as GPIO, but it is not recommended.


As for workarounds :

- One may apply software (change if needed OS) in order to ignore

  USB_OC interrupts.

- Do not use the PB24 as GPIO (as set it high) when USB is active.

Have a great day,
Yuri

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

在原帖中查看解决方案

0 项奖励
回复
1 回复
481 次查看
Yuri
NXP Employee
NXP Employee

Hello,

  Really USB_OC interrupts cannot be masked and the Reference Manual is incorrect regarding OPM,
H2PM, H1PM bits - they do not mask Over Current events. The problem is that basically USB_Overcurrent
is an input signal, that can only be used for USB function, not for GPIO function, since  corresponding USB

interrupt cannot be disabled. 

  Although USB_OC may be used as GPIO, but it is not recommended.


As for workarounds :

- One may apply software (change if needed OS) in order to ignore

  USB_OC interrupts.

- Do not use the PB24 as GPIO (as set it high) when USB is active.

Have a great day,
Yuri

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

0 项奖励
回复