Skip to content
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

Add board flash 0x9f SPI command to web config #1075

Merged
merged 12 commits into from
Sep 17, 2024

Conversation

arntsonl
Copy link
Contributor

This adds the 0x9f SPI identification command to the web config memory info.

The system stats now show the actual board flash size identified by the flash chip itself.

ImgBotApp and others added 10 commits May 28, 2024 15:34
*Total -- 11,807.83kb -> 10,597.19kb (10.25%)

/configs/MavercadeRev2/assets/Rev2_config_pic.jpg -- 1,148.71kb -> 1,001.39kb (12.83%)
/configs/MavercadeRev2/assets/Rev2_thumbnail.png -- 4,501.00kb -> 3,984.05kb (11.49%)
/configs/ZeroRhythm/Assets/ZeroThythm 2.jpg -- 2,954.52kb -> 2,669.00kb (9.66%)
/configs/ZeroRhythm/Assets/ZeroRhythm 1.jpg -- 2,687.40kb -> 2,428.72kb (9.63%)
/configs/MavercadeRev1/assets/Rev1_config_pic.png -- 516.19kb -> 514.02kb (0.42%)

Signed-off-by: ImgBotApp <[email protected]>
[ImgBot] Optimize images
@arntsonl arntsonl marked this pull request as draft June 19, 2024 20:57
@arntsonl
Copy link
Contributor Author

This crashes the board randomly :(

Before I close this as not an option, I am going to try to add the SPI flash cmd to the beginning of main() and see if we can consistently pull that at the beginning.

It's a neat feature but not worth crashing web config.

@arntsonl
Copy link
Contributor Author

A MUCH better idea is to do this in the gp2040 setup() or before that somewhere we know will not crash

TO-DO:

add this code to setup()

uint8_t txbuf[FLASH_STORAGE_TOTAL_BYTES] = {0};
uint8_t rxbuf[FLASH_STORAGE_TOTAL_BYTES] = {0};
txbuf[0] = FLASH_STORAGE_CMD;
flash_do_cmd(txbuf, rxbuf, FLASH_STORAGE_TOTAL_BYTES);

then store the value into a permanent location so it only happens once!

@arntsonl arntsonl marked this pull request as ready for review September 17, 2024 01:54
@arntsonl arntsonl merged commit 9e3d7a6 into OpenStickCommunity:main Sep 17, 2024
44 checks passed
@arntsonl arntsonl deleted the 20240619_boardflash_info branch September 17, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants