Hi,
i've got a question concerning the XHRA-2HPA.
Is it necessary, that the audio clocks are enabled before the device is attached to usb?
The problem is, that the PC does not report, that a device is attached and may this could be the problem,
because my whole power supply for the audio peripheral is switched on by setting GPIO_1 (S_USB_HOST) high.
So in other words the 22.5792MHz and 24.576MHz oscillators are not running until the device is connected to a USB host.
Of course I checked, if my system clock is running and it does and the XHRA-2HPA also reads the flash configuration,
but nothing happens, if I connect the board to the PC.
Thank you in advance!
XHRA-2HPA audio clock needed to establish a USB connection? Topic is solved
-
- Junior Member
- Posts: 6
- Joined: Fri Apr 15, 2016 3:32 pm
-
Verified
- XCore Legend
- Posts: 1185
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Hi,
Yes i believe the I2S block may stall if there is no audio clock after the "Initialisation event" (0x18)
Yes i believe the I2S block may stall if there is no audio clock after the "Initialisation event" (0x18)
-
- Junior Member
- Posts: 6
- Joined: Fri Apr 15, 2016 3:32 pm
Thank you!
I tried to fix that problem by setting the GPIO high in the init-event, but now it switches my power supply on and off (~100 per minute) and the pulse duration is only about 60-70us. I'll guess, that my oscillators are not enabled that fast, so that the XHRA-2HPA does a software reset.
Is that a possible explanation?
Anyway I tried preventing this behaviour by adding a delay in the init-event:
# System intialize event
EVT_SYS_INIT = [
GPIO(GPIO_S_USB_HOST, HIGH),
DELAY_MS(500),
]
but this does not work.
Any other way to fix this in software or do I have to make changes to my board?
I tried to fix that problem by setting the GPIO high in the init-event, but now it switches my power supply on and off (~100 per minute) and the pulse duration is only about 60-70us. I'll guess, that my oscillators are not enabled that fast, so that the XHRA-2HPA does a software reset.
Is that a possible explanation?
Anyway I tried preventing this behaviour by adding a delay in the init-event:
# System intialize event
EVT_SYS_INIT = [
GPIO(GPIO_S_USB_HOST, HIGH),
DELAY_MS(500),
]
but this does not work.
Any other way to fix this in software or do I have to make changes to my board?
-
Verified
- XCore Legend
- Posts: 1185
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
The init event should only occur once on power up - is your power supply powering the xcore somehow also (causing a reboot and another init?)
-
- Junior Member
- Posts: 6
- Joined: Fri Apr 15, 2016 3:32 pm
No, the power supply, which is enabled by the gpio pin is not the one, which powers the xcore.
The xcore power supply is always enabled, if a usb cable is attached or external 5v are applied (power mux).
Tomorrow I will check if the 3.3v or 1v drops and causes a reset by the external reset circuit - I forgot to check that...
Seems like I have got another problem here, but normally setting the gpio pin high in the init-event should solve my first problem?
Thanks!
The xcore power supply is always enabled, if a usb cable is attached or external 5v are applied (power mux).
Tomorrow I will check if the 3.3v or 1v drops and causes a reset by the external reset circuit - I forgot to check that...
Seems like I have got another problem here, but normally setting the gpio pin high in the init-event should solve my first problem?
Thanks!
-
Verified
- XCore Legend
- Posts: 1185
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Yes i think so, if it doesn't let us know and i can dig into the device code a little.
-
- Junior Member
- Posts: 6
- Joined: Fri Apr 15, 2016 3:32 pm
To conclude this topic:
The XHRA-2HPA does what it should do, but switching on the power supply causes a short, enormous current, so that the 5V drops to ~2.5V and this causes a reset by the external reset circuit what ends in switching it on and off.
Anyway somehow I got it stable for a moment, plugged it to the USB and the XMOS was detected by the PC. So everthing works fine except my power supply...
Thank you for your support!
The XHRA-2HPA does what it should do, but switching on the power supply causes a short, enormous current, so that the 5V drops to ~2.5V and this causes a reset by the external reset circuit what ends in switching it on and off.
Anyway somehow I got it stable for a moment, plugged it to the USB and the XMOS was detected by the PC. So everthing works fine except my power supply...
Thank you for your support!