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

Dual USB Setup Not Working on GPIO 2,3 and GPIO 4,5 - LV Code Commented Out #79

Open
zoushiyin opened this issue Feb 13, 2025 · 0 comments

Comments

@zoushiyin
Copy link

Hello,

The following code is from the [https://github.com//issues/65#issuecomment-2519971280 branch,](branch: https://github.com/No0ne/ps2x2pico/tree/65-built-in-software-usb-hub-on-pio-sm), a dual USB version. Why is the LVOUT part commented out? Additionally, when I compile it for a dual USB setup on GPIO pins 2, 3, and GPIO pins 4, 5, the board does not work. I have followed the schematic from #65 (comment) to design my PCB for the Pico Zero version.Could you help analyze what might be causing this issue? Thank you very much.

int main() {
set_sys_clock_khz(120000, true);
board_init();
printf("\n%s-%s\n", PICO_PROGRAM_NAME, PICO_PROGRAM_VERSION_STRING);

//gpio_init(LVOUT);
//gpio_init(LVIN);
//gpio_set_dir(LVOUT, GPIO_OUT);
//gpio_set_dir(LVIN, GPIO_OUT);
//gpio_put(LVOUT, 1);
//gpio_put(LVIN, 1);

tuh_hid_set_default_protocol(HID_PROTOCOL_REPORT);
tuh_init(0);

pio_usb_configuration_t pio_cfg = PIO_USB_DEFAULT_CONFIG;
pio_cfg.pin_dp = 2;
tuh_configure(1, TUH_CFGID_RPI_PIO_USB_CONFIGURATION, &pio_cfg);
tuh_init(1);

pio_usb_host_add_port(4, PIO_USB_PINOUT_DPDM);

kb_init(KBOUT, 0); //KBIN);
ms_init(MSOUT, 0); //MSIN);

while(1) {
tuh_task();
kb_task();
ms_task();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant