faydrus
(Dan Fay)
March 21, 2020, 5:41pm
1
I have a pair of STM32H743ZI2 boards that I would like to use with my project, given their very high performance. The QSPI flash interface, however, does not appear to be supported. Having this support would be awesome. Any idea if QSPI is going to be supported anytime soon?
Thanks,
-Dan Fay
1 Like
Hi Dan
Good catch!
Please see and review:
ARMmbed:master
← jeromecoutant:PR_H7_QSPI
opened 05:51PM - 23 Mar 20 UTC
### Summary of changes
This enables QSPI support for STM32H7.
DISCO_H747I… boards embeds MT25QL512 from MICRON.
#### Impact of changes
#### Migration actions required
<!--
This should only be applicable in Major PR types for which this field is MANDATORY.
NOTE: This section is automatically written to release notes for Feature and
Major releases and should contain enough details for a user.
-->
### Documentation
<!--
Please provide details of any document updates required, including links to any
related PRs against the docs repository.
If no document updates are required please specify 'None', this at least tells us
that this has been considered.
-->
----------------------------------------------------------------------------------------------------------------
### Pull request type
<!--
Please add only one X to one of the following types. Do not fill multiple types (split the pull request otherwise).
Please note this is not a GitHub task list, indenting the boxes or changing the format to add a '.' or '*' in front of them would change the meaning incorrectly.
-->
[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)
----------------------------------------------------------------------------------------------------------------
### Test results
| target | platform_name | test suite | test case | passed | failed | result | elapsed_time (sec) |
|-------------------|---------------|---------------------------------------------------------|---------------------------------------------------|--------|--------|--------|--------------------|
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | DEFAULT Testing get type functionality | 1 | 0 | OK | 0.1 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | FLASHIAP Testing BlockDevice erase functionality | 1 | 0 | OK | 2.86 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | FLASHIAP Testing Deinit block device | 1 | 0 | OK | 0.1 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | FLASHIAP Testing Init block device | 1 | 0 | OK | 0.09 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | FLASHIAP Testing contiguous erase, write and read | 1 | 0 | OK | 6.38 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | FLASHIAP Testing multi threads erase program read | 1 | 0 | OK | 4.73 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | FLASHIAP Testing program read small data sizes | 1 | 0 | OK | 6.96 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | FLASHIAP Testing read write random blocks | 1 | 0 | OK | 13.05 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | FLASHIAP Testing unaligned erase blocks | 1 | 0 | OK | 1.1 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | FLASHIAP Testing write -> deinit -> init -> read | 1 | 0 | OK | 2.78 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | QSPIF Testing BlockDevice erase functionality | 1 | 0 | OK | 0.56 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | QSPIF Testing Deinit block device | 1 | 0 | OK | 0.08 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | QSPIF Testing Init block device | 1 | 0 | OK | 1.18 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | QSPIF Testing contiguous erase, write and read | 1 | 0 | OK | 4.65 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | QSPIF Testing multi threads erase program read | 1 | 0 | OK | 6.62 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | QSPIF Testing program read small data sizes | 1 | 0 | OK | 0.81 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | QSPIF Testing read write random blocks | 1 | 0 | OK | 1.51 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | QSPIF Testing unaligned erase blocks | 1 | 0 | OK | 0.66 |
| DISCO_H747I-ARMC6 | DISCO_H747I | features-storage-tests-blockdevice-general_block_device | QSPIF Testing write -> deinit -> init -> read | 1 | 0 | OK | 3.68 |
[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR
----------------------------------------------------------------------------------------------------------------
### Reviewers
<!--
Request additional reviewers with @username or @team
-->
----------------------------------------------------------------------------------------------------------------
Jerome
faydrus
(Dan Fay)
March 23, 2020, 10:26pm
3
Hi Jerome,
When I try to directly check out your fork of mbed-os, I get errors like this:
./mbed-os/components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.h:369:11: error: no type named 'qspi_inst_t' in namespace 'mbed'
mbed::qspi_inst_t _4byte_msb_reg_write_inst;
~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
I also tried to integrate your code into my checked-out version of Mbed OS. I still got the same 4002 error returned from bd.init().
NOTE: this is on a custom board using a Winbond W25Q128JVSIQ. The STM32H7 board is a NUCLEO-H743ZI2. This board works fine with the NUCLEO-F746ZG STM32 board.
-Dan Fay
faydrus
(Dan Fay)
March 24, 2020, 12:14am
4
UPDATE: it looks like it’s almost completely compiling for me. I do need to port my usage of RawSerial over to UnbufferedSerial, however. I’ll do that tomorrow.
faydrus
(Dan Fay)
March 24, 2020, 12:39am
5
Got your OS version to build and run on the board, but the -4002 error is still there. I had previously did some hacks to mbed-os to get QSPI to build and sorta run, and got the same result as I’m getting with your OS version.
faydrus
(Dan Fay)
March 24, 2020, 6:13am
6
UPDATE: I got QSPI working on the NUCLEO-H743ZI2. The final issue I was having was related to a “documentation bug” in the NUCLEO-144 documentation.
I was using the wrong CS pin. Unlike the other NUCLEO-144 boards I’ve used, PB_6 s not connected to the QSPI_CSN pin. Instead, you need to use PG_6. You can make PB_6 the QSPI_CSN pin, but you need to change some solder bridges/zero-Ohm resistors to make it work.
Hi Dan
It seems you solved your issue.
Let me sum up what I understood
you are using a QSPI shield that uses CN10 connector
I confirm that PB6 is not connected, see:
NUCLEO-H743ZI2 | Mbed
PB6 can be found with Arduino D1 without any HW patch
1 Like
faydrus
(Dan Fay)
March 25, 2020, 3:47am
8
Yes, that is correct. Also note that the “documentation bug” is not in any part of Mbed OS, but rather is in some documents from ST.