Endless loop in usb_dc_stm32_phy_specific_clock_enable for st_stm32n6_otghs? #97589
-
|
I have encountered what looks like a bug, but I lack the expertise to create a proper issue with test-case etc. So I'm looking for help in confirming and ideally fixing the issue. In #84976 this code was added to Isn't the while condition missing a negation? I have no idea if it is possible that Vdd USB voltage was already enabled, but the code looks like it's not doing what it is intended to do. Thanks for looking into this. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 10 replies
-
|
@modersohn It is not clear if you're actually facing an issue. Can you provide more details: Board in use, Zephyr version ( |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for looking at this. We're using the stm32n6570_dk board trying to make MCUBoot activate DFU mode with mcuboot-button0. But since I'm not the actual dev working on this, I can't quickly provide a test-case etc. I was hoping the code would be so obviously wrong that just having a look at it would be maybe enough for someone with more knowledge on the topic. We're using release 4.2.0 but the code is on main as of today. |
Beta Was this translation helpful? Give feedback.
-
Sure, but OTHO it was also tested working, so it's worth understanding why it'd be failing on your side and not ours. |
Beta Was this translation helpful? Give feedback.
-
|
I was now able to see it hanging endlessly in that loop in the debugger. This is an excerpt of MCUboot.conf: Then, in app.overlay define Start the MCUBoot binary in the debugger, press the user button and let it run. Log output shows: Now on the host run Expected: device should reattach with different PID |
Beta Was this translation helpful? Give feedback.
-
For the record,
This seems very plausible. According to the N6 Reference Manual (RM0486 I suspect that since step Unfortunately, I haven't been able to find this |
Beta Was this translation helpful? Give feedback.
Ok, I'll open a PR to integrate this change.