Forums › Devices › OSD32MP15x › OSD32MP153C GPIO read
hello,
We implemented the STUSB1600 in our board using the OSD32MP153C-512M-BAA.
Its ALERT# pin is connected to PE8, which is defined as an interrupt for the SoC.
Implementation is the same as ST DK2 eval board (except we use PE8 and ST uses PI11).
When I measure the voltage on PE8, I read Low.
When I read the value using an I2C4 read command, from the UBOOT CLI, I get High.
How can that be?
From UBOOT CLI, I use:
i2c dev 0
gpio input GPIOE8
Attached find the UBOOT device tree files.
thanks,
Gil
Gil,
The device tree attached shows that GPIOE8 has the internal pull-up enabled. However, there should not be a measurement discrepancy between u-boot CLI and measurement.
Here is an interaction I just had on the CLI to show status of GPIOE8 on the RED board:
1 2 3 4 5 6 7 8 9 | STM32MP> gpio input GPIOE8 gpio: pin GPIOE8 (gpio 72) value is 0 STM32MP> gpio status GPIOE8 Bank GPIOE: GPIOE8: input: 0 [ ] |
Hi Neeraj,
I agree.
There shouldn’t be any discrepancy.
But, there is.
What is wrong here?
Why do the GPIO measurement and GPIO I2C read give different results?
thanks,
Gil
Hi Neeraj,
I checked GPIOE8 after power up and it reads Low (via UBOOT CLI).
After some time I checked again and it reads High (few minutes, maybe 10 minutes).
Nothing changed in the setup. Scope read 0V the entire time.
Can you perform the same?
thanks,
Gil
Hi Neeraj,
I checked STUSB1600 registers from UBOOT CLI, in different USB connection scenarios.
All registers, but one, seem to be correct. The device registers reflect correctly a dynamic connect/disconnect on its USB port
One thing that is not defined correctly in the STUSB1600, for all scenarios:
Register 0x0c = 0xf3 which means all interrupts are masked.
So, when we dynamically connect/disconnect a Host or device to our system, the STUSB1600 will not issue an interrupt.
How do we correct that?
thanks,
Gil
Gil,
I am investigating and will report back.
Best,
Neeraj
Hi Neeraj,
Adding some data:
I changed STUSB1600 register 0x0c to 0x93 to unmask the interrupts.
I reset the board with a USB Host connected to it.
All registers’ values reflect the state correctly.
I disconnected the USB Host.
All registers’ values reflect the state correctly.
I connected a USB Device.
All registers’ values reflect the state correctly.
But, the ALERT# pin (interrupt) is not changing. Scope shows Low level all the time.
No activity whatsoever.
And gpio input GPIOE8 reads High.
STM32MP> gpio input GPIOE8
gpio: pin GPIOE8 (gpio 72) value is 1
Maybe something is wrongly defined with GPIO PE8.
I sent you the dts files.
What are we missing here?
Thanks,
Gil
Gil,
Can you check the connection of VDD(pin 24) of USBC1600? For OTG functionality, this needs to be connected to mid way point of the USB-C sink power path. On the RED board, I needed to change the jumper position of JP21 in order for OTG function to work. I was able to verify both sink and source modes as well as see the interrupt on ALERT pin when something is connected.
I am still unsure why you are reading different value of GPIO. My suspicion is that there is an issue with U-Boot CLI handling this claimed pin. I will check further, but I don’t think anything is wrong based on the functionality all working.
Best,
Neeraj
Hi Neeraj,
On our system, VDD pin of the STUSB1600 is connected to 5V (same 5V that power the Octavo SiP).
The same connection exists in the Octavo DK2 ref design (attached picture).
We don’t have a Sink capability, in the sense that an external USB Host powers our system.
We can act as a USB Host with power sourcing and as a USB Device.
So, we don’t have a power Sink circuit (as the RED has).
I attached also our circuit design.
What do you think?
Thanks,
Gil
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields