-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/stm32/periph_eth: Add stm32_eth_tracing #18418
Merged
maribu
merged 2 commits into
RIOT-OS:master
from
maribu:cpu/stm32/periph/stm32_eth_tracing
Sep 18, 2022
Merged
cpu/stm32/periph_eth: Add stm32_eth_tracing #18418
maribu
merged 2 commits into
RIOT-OS:master
from
maribu:cpu/stm32/periph/stm32_eth_tracing
Sep 18, 2022
Conversation
This file contains 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
maribu
added
Type: enhancement
The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Area: network
Area: Networking
Type: new feature
The issue requests / The PR implemements a new feature for RIOT
State: waiting for other PR
State: The PR requires another PR to be merged first
Area: cpu
Area: CPU/MCU ports
labels
Aug 8, 2022
maribu
requested review from
aabadie,
fjmolinas,
DipSwitch,
vincent-d,
leandrolanzieri and
kaspar030
as code owners
August 8, 2022 12:53
github-actions
bot
added
Area: boards
Area: Board ports
Area: build system
Area: Build system
Area: CI
Area: Continuous Integration of RIOT components
Platform: ARM
Platform: This PR/issue effects ARM-based platforms
and removed
Area: network
Area: Networking
labels
Aug 8, 2022
maribu
force-pushed
the
cpu/stm32/periph/stm32_eth_tracing
branch
from
August 8, 2022 13:41
47b12f4
to
e56e3d0
Compare
github-actions
bot
removed
the
Area: CI
Area: Continuous Integration of RIOT components
label
Aug 8, 2022
5 tasks
maribu
force-pushed
the
cpu/stm32/periph/stm32_eth_tracing
branch
from
August 9, 2022 19:59
e56e3d0
to
8a6dd77
Compare
maribu
force-pushed
the
cpu/stm32/periph/stm32_eth_tracing
branch
from
September 14, 2022 11:59
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.
maribu
force-pushed
the
cpu/stm32/periph/stm32_eth_tracing
branch
from
September 14, 2022 12:00
510a9c6
to
44b62e8
Compare
This may also be interesting to @fabian18 It can be used for two things:
|
benpicco
added
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
and removed
State: waiting for other PR
State: The PR requires another PR to be merged first
labels
Sep 18, 2022
benpicco
approved these changes
Sep 18, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Thx :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: build system
Area: Build system
Area: cpu
Area: CPU/MCU ports
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Platform: ARM
Platform: This PR/issue effects ARM-based platforms
Type: enhancement
The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Type: new feature
The issue requests / The PR implemements a new feature for RIOT
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_tracing
that 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: