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

STM32H735 Octospi1 flash memory map mode example? #367

Open
tronical opened this issue Jun 1, 2022 · 2 comments
Open

STM32H735 Octospi1 flash memory map mode example? #367

tronical opened this issue Jun 1, 2022 · 2 comments

Comments

@tronical
Copy link

tronical commented Jun 1, 2022

We're working with an STM32H735 discovery board and were very glad to discover the existing example that shows how to use the 16MB hyperram connected via the octospi2 peripheral.

Connected via the the octospi1 peripheral is the 64MB Macronix MX25LM51245GXDI00 flash storage, for which the octospi.rs example appears to show how to run commands on the controller.

Since the board appears to support accessing that storage also via memory mapping using the hyperbus protocol, we've been trying to make use of that. Unfortunately we haven't had any luck accessing the storage for reading. Short of a GitHub discussion forum, we were wondering if anyone here had any success with that and would be willing to contribute an example?

What we've tried so far is a Hyperbus config based on what I could find in page 39 in application note AN5050 with device_size_bytes(26), chip_select_high(3) and refresh_interval(0).

Unfortunately accessing the memory for reading at 0x90000000 as returned by init() doesn't work ("crash").

edit: we're writing into that flash area via stm32cubeprogrammer, the flash algo in probe-rs (originating from the Keil DFP) does't appear to work. Maybe related?

@richardeoin
Copy link
Member

Hi! Great that you're investigating this. Unfortunately I don't have an example to contribute, but it would be great if someone else can!

As far as I can tell, Macronix MX25LM51245GXDI00 isn't a HyperBus device but rather just an "ordinary" octo-SPI flash (hence the N/A area in AN5050 Table 5). Have you been able to successfully read from it using Indirect Read mode? I would try that first before moving onto the memory-mapped mode.

@tronical
Copy link
Author

You’re absolutely right. Thanks for spotting, the hyperbus makes no sense here. I’m indeed interested in enabling memory-mapped mode.

I’ll play a bit more with indirect mode and reading/writing.

@tronical tronical changed the title STM32H735 Octospi1 hyperbus flash example? STM32H735 Octospi1 flash memory map mode example? Jun 16, 2022
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

2 participants