File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
ports/raspberrypi/common-hal/usb_host Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -122,10 +122,10 @@ usb_host_port_obj_t *common_hal_usb_host_port_construct(const mcu_pin_obj_t *dp,
122
122
pio_usb_configuration_t pio_cfg = PIO_USB_DEFAULT_CONFIG ;
123
123
pio_cfg .skip_alarm_pool = true;
124
124
pio_cfg .pin_dp = dp -> number ;
125
- pio_cfg . pio_tx_num = 0 ;
126
- pio_cfg . pio_rx_num = 1 ;
127
- // PIO with room for 22 instructions
128
- // PIO with room for 31 instructions and two free SM.
125
+ // Allocating the peripherals like this works on Pico W, where the
126
+ // "preferred PIO" for the cyw43 wifi chip is PIO 1.
127
+ pio_cfg . pio_tx_num = 1 ; // uses 22 instructions and 1 SM
128
+ pio_cfg . pio_rx_num = 0 ; // uses 31 instructions and 2 SM.
129
129
if (!_has_program_room (pio_cfg .pio_tx_num , 22 ) || _sm_free_count (pio_cfg .pio_tx_num ) < 1 ||
130
130
!_has_program_room (pio_cfg .pio_rx_num , 31 ) || _sm_free_count (pio_cfg .pio_rx_num ) < 2 ) {
131
131
mp_raise_RuntimeError (MP_ERROR_TEXT ("All state machines in use" ));
You can’t perform that action at this time.
0 commit comments