2019-03-19 05:04 AM
Hi,
I am trying to use Host Negotiation Protocol on STM32 boards.
Two boards are connected together stm32f4-discovery (A-device) and stm32f429i-disc1 (B-Device). VBUS sensing, HNPCAP is enabled at both side.
DHNPEN bit in GOTGCTL register is enabled after SetFeature(HNP Enable) received at B-Device and HSHNPEN is set after SetFeature(HNP Enable) ACK received at A-Device.
I see, that 7.5 ms after Suspending bus D+ goes low resulting SE0 state.
But 4 ms SE0 state D+ goes high, and no OTG interrupt fired on A-Device side.
On B-device side I see HNSSCHG interrupt, but HNGSCS flag in GOTGCTL register is 0 (HNP failed). I think the reason is, that A-Device doesn't apply Pull-up within 3 ms.
What can be the reason for this behaviour? What I missed to set up to get working HNP?
Thanks in advance.
Zoltan
2019-03-20 03:06 PM
You probably have a much deeper understanding of the OTG machine of the Synopsys USB module than anybody else here, so don't hold your breath waiting for a relevant answer.
For the less relevant ones, have you had a look at the OTG part of the SPL-based en.stm32_f105-07_f2_f4_usb-host-device_lib.zip ?
JW
2019-03-21 03:48 AM
Hi Jan,
Thanks for replying.
I already know this code, and double checked if it matches my code.
Unfortunately I haven't found any working example for HNP on STM32, which could be helpful for me.
Best Regards
Zoltan
2019-05-01 09:01 AM
Hi Mr. Zoltan,
I am facing the exact same problem that no OTG interrupt is fired on the A-Device. Did you manage to get OTG working? It would be great if you can help me. Thanks.
Best Regards,
Mughees