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

add serial port input to defmt-print #940

Merged

Conversation

brightbloom
Copy link
Contributor

No description provided.

@jonathanpallant
Copy link
Contributor

This looks great - thank you for the PR.

Can I ask, what's your use-case for getting defmt data over a serial port?

@brightbloom
Copy link
Contributor Author

Of course! I'm working on a low power system in which I am moving the chip in/out of various low power modes. This causes some issues with defmt over RTT when the RAM is powered down and seemingly random data is read back.

And, more importantly, the chip's SWD silicon consumes a significant amount of power on its own and can't be turned on/off easily during execution.

My use case is to redirect all defmt output to a debug UART on the chip, and use a custom defmt handler to manually enable/disable the clock to the peripheral before/after each write. This way, the UART is only consuming current when it is actively logging data and I can see the true current consumption of the system at all other times.

@jonathanpallant
Copy link
Contributor

LGTM. Thoughts @Urhengulas ?

@jonathanpallant jonathanpallant added this pull request to the merge queue Mar 3, 2025
Merged via the queue into knurling-rs:main with commit 45ae892 Mar 3, 2025
23 checks passed
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.

3 participants