jerpelea opened a new pull request, #19623:
URL: https://github.com/apache/nuttx/pull/19623

   ## Summary
   
   usbdev_register() calls CLASS_BIND, which ends with DEV_CONNECT 
(composite_bind/cdcacm_bind) and sets SIE_CTRL.PULLUP_EN, and then performs a 
wholesale putreg32 of SIE_CTRL to set EP0_INT_1BUF -- clobbering the pull-up 
microseconds after it was asserted.
   
   Enumeration only ever succeeded because the host happened to latch the 
microsecond pull-up blip and issued a bus reset, whose handler 
(CLASS_DISCONNECT -> DEV_CONNECT) re-arms the pull-up.  A warm host port 
catches the blip; a cold-plugged port is still in attach debounce, misses it, 
and never resets -- PULLUP_EN stays 0 forever and the device is totally silent 
on the bus while NuttX runs normally underneath. This presented as an 
intermittent, image-dependent "cold boot brick" (boot timing shifts the blip in 
or out of the host's blind window).
   
   Fix: set EP0_INT_1BUF with setbits_reg32 so PULLUP_EN survives.
   
   Validated on RP2350 silicon (Raspberry Pi Pico 2 W): an image that failed 
0/10 cold plugs enumerated 10/10 with the fix; a second board that had never 
enumerated at all was recovered by it.  The rp2040 driver has the identical 
code and receives the identical fix (build-tested; the RP2350 validation 
exercised the shared logic).
   
   Fixes apache/nuttx#19434
   
   ## Impact
   
   RELEASE
   
   ## Testing
   
   CI


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to