Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pico pio usb host: verify types of pio resources used #9958

Open
jepler opened this issue Jan 13, 2025 · 1 comment
Open

pico pio usb host: verify types of pio resources used #9958

jepler opened this issue Jan 13, 2025 · 1 comment
Labels
enhancement rp2 Both RP2 microcontrollers usb
Milestone

Comments

@jepler
Copy link
Member

jepler commented Jan 13, 2025

Current Pico-PIO-USB says:

  • 1 PIO, 3 state machines, 32 instructions

but we check for 2 PIOs with 31+22 instructions:

    if (!_has_program_room(pio_cfg.pio_tx_num, 22) || tx_sm_free < 1 ||
        !(tx_sm_free == 4 || is_gpio_compatible(pio_tx, used_gpio_ranges)) ||
        !_has_program_room(pio_cfg.pio_rx_num, 31) || rx_sm_free < 2 ||
        !(rx_sm_free == 4 || is_gpio_compatible(pio_rx, used_gpio_ranges))) {
        mp_raise_RuntimeError(MP_ERROR_TEXT("All state machines in use"));
    }

It looks like this change occurred with 0.6.0: sekigon-gonnoc/Pico-PIO-USB@d1f050a

@jepler
Copy link
Member Author

jepler commented Jan 13, 2025

@ladyada ping

@tannewt tannewt added usb rp2 Both RP2 microcontrollers labels Jan 14, 2025
@tannewt tannewt added this to the 9.2.x milestone Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement rp2 Both RP2 microcontrollers usb
Projects
None yet
Development

No branches or pull requests

2 participants