USB control transfers vs ZLP

NIIBE Yutaka gniibe at
Thu Oct 3 09:29:47 CEST 2019

Jeremy Drake <jeremy at> writes:
> Another interesting difference with this one is that I am using a DFU
> bootloader.  Hasn't been an issue up to now, and don't see how the commit
> that seemed to break things would matter.  One thing I did notice is that
> if the board was "soft" reset by the DFU bootloader after it had used the
> USB to receive a new build, it would work with the newer chopstx, but
> would then fail on a cold reset from unplugging and replugging not in DFU
> mode.

For this issue (invocation from DFU bootloader), the commit


matters, probably, I guess.

Does your board has a gate or a transistor to control D+ line?

For the commit (and related commits), I tried to clean up things around
USB initialization.

Before the commit, asserting the gate is controlled by usb_lld_sys_init
and usb_lld_sys_shutdown routines.

Now, usb_lld_sys_init and usb_lld_sys_shutdown are not called anymore by
USB driver, and it assumes that your board configuration of
VAL_GPIO_LED_ODR has correct value.

More information about the Gnuk-users mailing list