When running the usb/device/dev_lowlevel example for RP2350 on risc-v compiled using the 2.2.0 SDK the example doesn't work. The program will acknowledge the first packet received (set address) and then NAK every subsequent package.
This appears to be due to some regression in the interaction between the IRQ handler and the code in the example causing IRQs to not fire correctly. Since there has been some changes in the interrupt handling for Hazard3 in the switch from 2.1.1 to 2.2.0 that doesn't seem too farfetched.
Using 2.1.1 works for both targets and 2.2.0 works on m33.
Reproduce
Reproduction should only involve running the example and compiling using the 2.2.0 risc-v SDK.
If it is useful, I'm running the VSCode extension on a mac with no special alterations.
Working (slightly hacky) fix
Adding the following to "usb_device_init()":
irq_add_shared_handler(USBCTRL_IRQ, isr_usbctrl_callback, PICO_SHARED_IRQ_HANDLER_DEFAULT_ORDER_PRIORITY);
and renaming "isr_usbctrl()" to "isr_usbctrl_callback()" (+ declaring the function prototype at the top) appears to resolve the issue, however there is probably a cleaner way that it could be implemented that follows the intended design pattern better.
If the issue is more appropriate to post in the SDK repo let me know.
When running the usb/device/dev_lowlevel example for RP2350 on risc-v compiled using the 2.2.0 SDK the example doesn't work. The program will acknowledge the first packet received (set address) and then NAK every subsequent package.
This appears to be due to some regression in the interaction between the IRQ handler and the code in the example causing IRQs to not fire correctly. Since there has been some changes in the interrupt handling for Hazard3 in the switch from 2.1.1 to 2.2.0 that doesn't seem too farfetched.
Using 2.1.1 works for both targets and 2.2.0 works on m33.
Reproduce
Reproduction should only involve running the example and compiling using the 2.2.0 risc-v SDK.
If it is useful, I'm running the VSCode extension on a mac with no special alterations.
Working (slightly hacky) fix
Adding the following to "usb_device_init()":
irq_add_shared_handler(USBCTRL_IRQ, isr_usbctrl_callback, PICO_SHARED_IRQ_HANDLER_DEFAULT_ORDER_PRIORITY);and renaming "isr_usbctrl()" to "isr_usbctrl_callback()" (+ declaring the function prototype at the top) appears to resolve the issue, however there is probably a cleaner way that it could be implemented that follows the intended design pattern better.
If the issue is more appropriate to post in the SDK repo let me know.