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

[FR][P8] support multiple SPI flash for one platform #6

Open
ildar opened this issue Mar 13, 2021 · 10 comments
Open

[FR][P8] support multiple SPI flash for one platform #6

ildar opened this issue Mar 13, 2021 · 10 comments

Comments

@ildar
Copy link

ildar commented Mar 13, 2021

While Colme P8 is one platform, it happens to have different SPI flash components.
The fixed SPIFLASH_MANUFACTURER looks excessive. Could that be flexible or ignored?

@ildar
Copy link
Author

ildar commented Mar 14, 2021

I hope I did everything right. So

  1. apply patch to apache-mynewt-core
    0001-hw-drivers-flash-spiflash-add-JEDEC_MFC_XTX-and-XT25.patch.gz (would be nice to upstream it)
  2. add this to hw/bsp/nrf52/syscfg.yml:
    SPIFLASH_XT25F32B:      1   # PineTime standard chip
  1. having XT25F32B added to the number of standard chips, define "custom" chip as it always was (only one allowed!). E.g. as @tt1pjm suggested, SPIFLASH_MANUFACTURER: 0x20

@tt1pjm, could you please read the SPI flash chip model you have? I guess it should be Micron chip.

@tt1pjm
Copy link

tt1pjm commented Mar 14, 2021

Hey @ildar,
When I stepped through the mcuboot code to get the SPIFLASH_MANUFACTURER I did notice that a lookup was performed against the SPIFlash to be able to compare with the value provided. I think there was an assertion failure if no match and no further progress on booting/boot looping. It seems to be a redundant check as you suggest. If we're able to determine the correct jedec manufacturer we should be able to use it and continue to boot but would require changes to mcuboot.
On my SPIFlash I can see the text "XMC QH32BWIG" which I believe corresponds to the XM25QH32B model.

@ildar
Copy link
Author

ildar commented Mar 14, 2021 via email

@tt1pjm
Copy link

tt1pjm commented Mar 19, 2021

I flashed your bootloader above using OpenOCD. On restart all worked as expected and booted last loaded firmware. I've also tested a couple of OTA installs of firmware which also work as expected.

@ildar
Copy link
Author

ildar commented Mar 19, 2021 via email

@tt1pjm
Copy link

tt1pjm commented Mar 19, 2021

Happy to help. I'll be taking a closer look at the newer bootloader/reloader compatibility with the P8 so keep posting your progress.

@ildar
Copy link
Author

ildar commented Apr 2, 2021 via email

@ildar
Copy link
Author

ildar commented Apr 2, 2021 via email

@tt1pjm
Copy link

tt1pjm commented Apr 29, 2021

Flash chip for P8 now merged into mynewt-core:
apache/mynewt-core#2582

@StarGate01
Copy link

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

No branches or pull requests

3 participants