8000 boards/feather-nrf52840*: add external flash configuration by mguetschow · Pull Request #21324 · RIOT-OS/RIOT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

boards/feather-nrf52840*: add external flash configuration #21324

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

8000
Merged
merged 3 commits into from
Mar 28, 2025

Conversation

mguetschow
Copy link
Contributor

Contribution description

Both boards feather-nrf52840 and feather-nrf52840-sense have a GD25Q16 external flash according to the schematic, I've assumed that it is actually a GD25Q16C as on adafruit-pybadge.

Schematics can be found here and here, the datasheet is here, but I've copied the flash-specific values from adafruit-pybadge.

Testing procedure

make -C tests/drivers/mtd_raw flash test succeeds on both devices.

Playing around with make -C examples/basic/filesystem flash term is successful on both devices, too.

Issues/PRs references

Followed the example from #20980

@github-actions github-actions bot added the Area: boards Area: Board ports label Mar 25, 2025
@mguetschow mguetschow requested a review from crasbe March 25, 2025 20:15
@mguetschow mguetschow added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 25, 2025
Copy link
Contributor
@crasbe crasbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a Feather for testing unfortunately, but in general the changes are straight forward. Even though the mtd.c files are mostly guarded by the #ifdef MODULE_MTD, it would be nice to have documentation for the structs IMO.

I know that the other mtd.c files don't have that either, but it would still be nice. Perhaps even allow Doxygen to look into the file?

@crasbe crasbe added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label Mar 25, 2025
@riot-ci
Copy link
riot-ci commented Mar 25, 2025

Murdock results

✔️ PASSED

d1084e0 boards/feather-nrf52840*: improve board.h documentation

Success Failures Total Runtime
1160 0 1160 04m:44s

Artifacts

.driver = &mtd_spi_nor_driver,
.page_size = 256,
.pages_per_sector = 16,
.sector_count = 512,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to specify the sector_count? If not set it should be detected automatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I just noticed that some mtd params definitions do, so I added it. Will recheck without the explicit sector count.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also not documented to be an optional information: https://doc.riot-os.org/structmtd__dev__t.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, still works:

$ make -C tests/drivers/mtd_raw flash test
...
test 0
 -=[ MTD_0 ]=-
sectors: 512
pages per sector: 16
page size: 256
total: 2 MiB

Would you mind posting a follow-up PR that updates the documentation in that regard? Or tell me which other fields are optional, too, and I can do it?

@mguetschow
Copy link
Contributor Author

Thanks for having a look already!

Even though the mtd.c files are mostly guarded by the #ifdef MODULE_MTD, it would be nice to have documentation for the structs IMO.

The structs themselves are documented in https://doc.riot-os.org/group__drivers__mtd__spi__nor.html and the concrete values picked don't add much to be worth documenting IMO. After all, they are taken more or less straight from the datasheet.

I know that the other mtd.c files don't have that either, but it would still be nice. Perhaps even allow Doxygen to look into the file?

Doxygen currently doesn't parse source files at all: https://github.com/RIOT-OS/RIOT/blob/master/doc/doxygen/riot.doxyfile#L929. Changing that would be a major task, I guess, especially because it will start complaining about an infinite amount of undocumented symbols.

@crasbe
Copy link
Contributor
crasbe commented Mar 26, 2025

Doxygen currently doesn't parse source files at all

Right, I missed that it's a source file. You can pretty much ignore that comment then 😅

@crasbe
Copy link
Contributor
crasbe commented Mar 27, 2025

You can squash the fixups. Unfortunately this needs to be rebased after #21327.

@mguetschow mguetschow force-pushed the feather-nrf52840-flash branch from 862aef2 to d1084e0 Compare March 28, 2025 08:58
@mguetschow
Copy link
Contributor Author

You can squash the fixups. Unfortunately this needs to be rebased after #21327.

Done :)

@mguetschow mguetschow added this pull request to the merge queue Mar 28, 2025
Merged via the queue into RIOT-OS:master with commit e85269a Mar 28, 2025
26 checks passed
@mguetschow mguetschow deleted the feather-nrf52840-flash branch March 28, 2025 09:35
@mguetschow
Copy link
Contributor Author

Thank you!

@mguetschow mguetschow added this to the Release 2025.04 milestone Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / document 4A40 ation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0