Closed cbaechler closed 3 years ago
The pull-up is just part of the usb specs. That's how the hosts detects a device attaching, either DP or DN gets pulled up by a 1.5k resistor (DP for full-speed, DN for low-speed devices).
The 'b' command and the dfu runtime 'detach' implementation use the SB_WARMBOOT
block, but for that to work, the fpga needs to have been programmed for multi-boot support which won't be the case if you just do make prog
. That's usually only setup if you load the firmware via DFU to a device that's been pre-prepared with a bootloader image.
Note that the riscv_usb
demo in that repo doesn't really implement DFU it's just a demo of exposing the runtime interface of DFU. If you want the actual DFU bootloader you should be looking in https://github.com/no2fpga/no2bootloader/ and this repo also contains all the required stuff to make a proper multi-boot image.
Thanks a lot for your help.
The pull-up is just part of the usb specs. That's how the hosts detects a device attaching, either DP or DN gets pulled up by a 1.5k resistor (DP for full-speed, DN for low-speed devices).
I just learned something about usb specs! Great :smiley:
If you want the actual DFU bootloader you should be looking in https://github.com/no2fpga/no2bootloader/ and this repo also contains all the required stuff to make a proper multi-boot image.
Thanks for pointing me to this repo. It took me a while to make it work, but now I can dfu-load the riscv_usb
demo with success!
Hi Sylvain,
I am trying to get the
riscv_usb
example to work. So far I can build it successfully, program to the bitstream and firmware to the icebreaker and also get the console output. Furthermore I have wired the USB pins according to the description, and the usb device connects after sending commandc
! (BTW: I did not yet fully understand the pull-up to DP, what is the reason behind?)It is also visible in dfu-util:
Now if I execute
make dfuprog
, send theb
command in the console or press the button, the device seems to crash. Even theCDONE
LED turns off. What did I miss? Any hint where I could dig further?