-
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
drivers/enc28j60: fix ISR routine and bth #19461
Merged
Merged
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
benpicco
added
the
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
label
Apr 10, 2023
benpicco
changed the title
/drivers/enc28j60: fix ISR routine and bth
drivers/enc28j60: fix ISR routine and bth
Apr 10, 2023
benpicco
added
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
and removed
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
labels
Apr 10, 2023
benpicco
approved these changes
Apr 11, 2023
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.
Looks good to me and you provided testing results.
Just a whitespace nitpick:
The PKTIF does not reliably report the status of pending packags. Apply the proposed workaround [1]. [1] https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/Errata/80349c.pdf
bors merge |
bors bot
added a commit
that referenced
this pull request
Apr 12, 2023
19411: cpu/gd32v: add riotboot support r=benpicco a=gschorcht ### Contribution description This PR provides `riotboot` support for GD32V. ### Testing procedure Use any GD32V board with a JTAG adapter and flash the bootloader: ```python PROGRAMMER=openocd BOARD=sipeed-longan-nano make -C bootloaders/riotboot flash ``` Flash slot 0 and set `RIOT_VERSION` to 1 ```python USEMODULE=stdio_uart FEATURES_REQUIRED=riotboot RIOT_VERSION=1 \ PROGRAMMER=openocd BOARD=sipeed-longan-nano make -C tests/shell riotboot/flash-slot0 ... ### Flashing Target ### Binfile detected, adding ROM base address: 0x08000000 Flashing with IMAGE_OFFSET: 0x08001000 ``` ```python > main(): This is RIOT! (Version: 1) test_shell. ``` Flash slot 1 and set `RIOT_VERSION` to 2 ```python USEMODULE=stdio_uart FEATURES_REQUIRED=riotboot RIOT_VERSION=2 \ PROGRAMMER=openocd BOARD=sipeed-longan-nano make -C tests/shell riotboot/flash-slot1 ... ### Flashing Target ### Binfile detected, adding ROM base address: 0x08000000 Flashing with IMAGE_OFFSET: 0x08010800 ``` ```python > main(): This is RIOT! (Version: 2) test_shell. ``` ### Issues/PRs references 19432: boards/esp32: deduplication in common ESP32x board definitions r=benpicco a=gschorcht ### Contribution description The PR reduced code duplication in `boards/common/esp32*`. The PR moves the header files from `boards/common/esp32s3/include` that can be used for all types of ESP32x SoCs to a new common ESP32x board definition which is then included by all common ESP32x board definitions. ### Testing procedure Green CI. ### Issues/PRs references 19461: drivers/enc28j60: fix ISR routine and bth r=benpicco a=peteut Co-authored-by: Gunar Schorcht <gunar@schorcht.net> Co-authored-by: Alain Péteut <alain.peteut@yahoo.com>
Build failed (retrying...): |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: drivers
Area: Device drivers
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
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
When the
/drivers/enc28j60
driver was in use, many resets have been observed. A closer look revealed there is an SPI access in ISR context, which can lead to deadly embraces:RIOT/drivers/enc28j60/enc28j60.c
Line 253 in 6f0ac0c
To fix this issue, the SPI access has been moved to thread context.
Another potential issue is the Receive Packet Pending Interrupt Flag (PKTIF), which is not reliable. Refer to
ENC28J60 Silicon Errata and Data Sheet Clarification, section 6 Module: Interrupts.
To address this issue, the proposed workaround from the errata has been implemented.
Testing procedure
./RIOT/dist/tools/benchmark_udp run
on the host andUSEMODULE += benchmark_udp
on the target has been used for testing. No more freezes have been observed. The network stack in use waslwip
.A patch has been applied to test on IP4:
Issues/PRs references
Fixes #17593.