cpu/stm32/periph_eth: Add stm32_eth_tracing#18418
Merged
maribu merged 2 commits intoRIOT-OS:masterfrom Sep 18, 2022
Merged
Conversation
47b12f4 to
e56e3d0
Compare
5 tasks
e56e3d0 to
8a6dd77
Compare
8a6dd77 to
510a9c6
Compare
Add tracing support via GPIOs to trace the basic state of the Ethernet peripheral. The following signals are provided: - One GPIO pin is toggled on entry of the Ethernet ISR - On TX start an GPIO is set, on TX completion it is cleared - On RX complete an GPIO is set, once this is passed to the upper layer the GPIO is cleared again In order to reduce the overhead, GPIO LL is used. By default the on-board LEDs are used as tracing GPIOs. This makes it easy to debug when the state machine gets stuck without the need to attach a scope or logic analyzer.
510a9c6 to
44b62e8
Compare
Member
Author
|
This may also be interesting to @fabian18 It can be used for two things:
|
benpicco
approved these changes
Sep 18, 2022
Contributor
benpicco
left a comment
There was a problem hiding this comment.
Default behavior does not change and additional code is rather self-contained.
If you want this in (because it might still be valuable in the future) go for it.
Member
Author
|
Thx :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR improves debugging of the peripheral STM32 Ethernet driver. It was used to debug the issue fixed in #18416
It does two things:
DEBUG()output over the codestm32_eth_tracingthat allows tracing and debugging the STM32 stateDEBUG()impacts performance to muchTesting procedure
On an STM32 board with Ethernet and at least three LEDs, e.g. the Nucleo-F767ZI, run
For each IRQ LED0 should be toggled, LED1 should flash on TX briefly, and LED2 should flash on RX briefly. (LED1 and LED2 are flashed so fast that it is a bit tricky to see, but quite possible for the human eye when the room is a bit darker.
Issues/PRs references
Depends on and includes: