Skip to content

Conversation

@bessman
Copy link
Contributor

@bessman bessman commented Oct 27, 2025

This PR enables UART passthrough between the UART header pins and the ESP UART bus on the prototype PCB. Since these are the only two UART buses available, logging is disabled.

This PR is for testing purposes only. Do not merge.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @bessman, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@bessman
Copy link
Contributor Author

bessman commented Oct 27, 2025

@Tejasgarg Could you test this on the prototype, please? With this firmware, a UART bridge connected to the PSLab's UART header should be able to communicate with the ESP32 as if it were connected directly to it.

@bessman bessman marked this pull request as draft October 27, 2025 14:02
@bessman bessman requested a review from Tejasgarg October 27, 2025 14:25
Copy link
Contributor

@Tejasgarg Tejasgarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @bessman!
This is currently not working :( , and the ESP IDF is giving the following error:
A fatal error occurred: Failed to connect to ESP32-C3: No serial data received.

I am also noticing a strange glitch where the board enters the main application only when the external UART connector is attached to the headers, for some reason.
Additionally, after approximately 5 seconds, the TTL converter goes to sleep due to inactivity. At the same time, for some reason, the main code also stops executing, and the LED stops blinking, and instead remains in the ON position.

@bessman
Copy link
Contributor Author

bessman commented Oct 28, 2025

I'll try testing the passthrough on the nucleo by enabling a few more UART buses.

@bessman
Copy link
Contributor Author

bessman commented Oct 28, 2025

Strange. Passthrough works fine when I test it on the nucleo: https://github.com/bessman/pslab-mini-firmware/tree/nomerge/passthrough_test

Output from this test:

[INFO ] Received UART data on UART2: Hello, from UART1!
[INFO ] Received UART data on UART5: Hello, from UART4!
[INFO ] Enabling passthrough from UART2 to UART4
[INFO ] PASSTHROUGH: Received UART data on UART5: Hello, from UART1!

I am also noticing a strange glitch where the board enters the main application only when the external UART connector is attached to the headers, for some reason.
Additionally, after approximately 5 seconds, the TTL converter goes to sleep due to inactivity. At the same time, for some reason, the main code also stops executing, and the LED stops blinking, and instead remains in the ON position.

This is concerning. I can't think of any reason for this behavior. Will need further debugging, but it may have to wait until I have a prototype myself.

@Tejasgarg
Copy link
Contributor

Strange. Passthrough works fine when I test it on the nucleo: https://github.com/bessman/pslab-mini-firmware/tree/nomerge/passthrough_test

Let me test this on Nucleo on my end to ensure that I am not missing anything.

I also had another question regarding the ESP pin strapping.
In the current setup, I don't see the state for the ESP_BOOT and ESP_EN being defined anywhere in the main setup.
Is it defined somewhere else that I am missing?
Because without it, won't it lead to an undefined state for the ESP32?

@bessman
Copy link
Contributor Author

bessman commented Oct 28, 2025

I also had another question regarding the ESP pin strapping. In the current setup, I don't see the state for the ESP_BOOT and ESP_EN being defined anywhere in the main setup. Is it defined somewhere else that I am missing? Because without it, won't it lead to an undefined state for the ESP32?

I forgot to put that it. Try it now. Still, it shouldn't hang regardless of what state the ESP is in.

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 this pull request may close these issues.

2 participants