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

Is UART1 tested and working? #44

Open
MrJake222 opened this issue May 11, 2024 · 4 comments · May be fixed by #45
Open

Is UART1 tested and working? #44

MrJake222 opened this issue May 11, 2024 · 4 comments · May be fixed by #45

Comments

@MrJake222
Copy link
Contributor

UART0 is initialized only here:

uart_init(uart0, 115200);
gpio_set_function(UART_TX_PIN, GPIO_FUNC_UART);
gpio_set_function(UART_RX_PIN, GPIO_FUNC_UART);

I can't seem to find equivalent lines for UART1 and the pins should be different.

@josuah
Copy link
Collaborator

josuah commented May 11, 2024

Hello! I think the reason for only UART0 being enabled is that this is the only one piped to the FPGA by default:

#define ICE_USB_UART0_CDC 1

The several "USB-UART" interfaces presented here: https://pico-ice.tinyvision.ai/md_getting_started.html#autotoc_md6
Are not actually connected to UARTs. I should update the doc to avoid confusion and be more correct.

They are instead bound to different features as described.
In hope I understood your question well, feel free to ask again if I missed something!

@MrJake222
Copy link
Contributor Author

I understand that they're only virutal uarts.

My question is, if i define ICE_USB_UART1_CDC to 1, what will happen? will it work? do i get 2 uarts to fpga?

@josuah
Copy link
Collaborator

josuah commented May 11, 2024

if i define ICE_USB_UART1_CDC to 1, what will happen? will it work? do i get 2 uarts to fpga?

As you guessed, you would not, and modifying the firmware would be necessary.

pico-ice-sdk is here to enable to quickly put together a firmware that can be used with the FPGA.
It is aimed to be modified at compile time, i.e. with macros.
It contains examples which acts a bit like reference implementations.

pico-ice-default is here to provide most of the SDK features in a ready-to-use way.
I have not thought at bringing configuration for it before.
Would an example in pico-ice-sdk/examples with dual UART interfaces enabled work for you?
That would avoid adding code that is disabled by default.
Was there other features that you wanted enabled? Such as the USB-serial to SPI interface?

@MrJake222
Copy link
Contributor Author

Was there other features that you wanted enabled? Such as the USB-serial to SPI interface?

I've disabled SPI-CDC and enabled UART1

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

Successfully merging a pull request may close this issue.

2 participants