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.
Solved! Go to Solution.
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------