drivers/enc28j60: fix ISR routine and bth#19461
Merged
bors[bot] merged 2 commits intoRIOT-OS:masterfrom Apr 12, 2023
Merged
Conversation
benpicco
approved these changes
Apr 11, 2023
Contributor
benpicco
left a comment
There was a problem hiding this comment.
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
Contributor
|
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 <[email protected]> Co-authored-by: Alain Péteut <[email protected]>
Contributor
|
Build failed (retrying...): |
Contributor
|
Build succeeded: |
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
When the
/drivers/enc28j60driver 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 runon the host andUSEMODULE += benchmark_udpon 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.