Accessing QSPI Data Flash

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
Jacob_Beningo
Posts: 12
Joined: Thu Jul 07, 2016 8:45 pm

Accessing QSPI Data Flash

Post by Jacob_Beningo » Fri Jun 28, 2019 3:52 pm

I've been looking through the documentation for the Pyboard D-Series and I seem to be unable to find an example on how to access the second QSPI Flash module that is meant for storing data. Does this automatically mount or does it need to be done manually? If automatically, what location is it under?

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Accessing QSPI Data Flash

Post by jimmo » Fri Jun 28, 2019 9:59 pm

Do you see any filesystem at all? The first one is mounted as the filesystem, the second one is used to store additional (readonly) firmware (and is memory mapped into the stm32).

(Unlike the pyboard 1.x the stm32 internal flash is not used for the filesystem at all).

Jacob_Beningo
Posts: 12
Joined: Thu Jul 07, 2016 8:45 pm

Re: Accessing QSPI Data Flash

Post by Jacob_Beningo » Tue Jul 09, 2019 11:30 am

Thanks for the reply. For some reason I did not receive a notification that there was a response.

The issue might be in my understanding. I can see 2 MB mounted under /flash which is one of the QSPI modules. The second QSPI which you mention as for storing read only data I thought was also mounted to store data during run-time. It sounds like this is something that would be used only if I am storing firmware data during a kernel build? Not something that I would access from a general script?

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Accessing QSPI Data Flash

Post by jimmo » Tue Jul 09, 2019 12:07 pm

Jacob_Beningo wrote:
Tue Jul 09, 2019 11:30 am
The issue might be in my understanding. I can see 2 MB mounted under /flash which is one of the QSPI modules. The second QSPI which you mention as for storing read only data I thought was also mounted to store data during run-time. It sounds like this is something that would be used only if I am storing firmware data during a kernel build? Not something that I would access from a general script?
That's right. Only the first qspiflash is visible at the Python level. The second only stores (readonly) firmware, memory mapped into the STM32.

If you watch the dfu-util output during flashing you can see it write firmware, the first part to the internal flash and the second part to the "second" qspiflash.

Jacob_Beningo
Posts: 12
Joined: Thu Jul 07, 2016 8:45 pm

Re: Accessing QSPI Data Flash

Post by Jacob_Beningo » Tue Jul 09, 2019 10:38 pm

Thanks! That makes sense now.

Post Reply