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

Stm32 ospi qspi fallback support #11291

Merged
merged 4 commits into from Sep 2, 2019

Conversation

@LMESTM
Copy link
Contributor

commented Aug 22, 2019

Description

This PR adds support of QSPI driver onto STM32 targets that support OSPI IP.
This means that OSPI will be used in QSPI fallback mode.

This has been tested with DISCO_L49RI and MX25LM51245G flash memory. Because this memory supports only Single and Octal IO modes, only Single mode is being used now. Octal mode may be used when OSPI support is added to mbed.

Also as MX25LM51245G does not support SFDP, only QSPIF tests have been passed, Block device tests can't as of now (see question in #11287 )

This PR depends on #11290

Pull request type

[ ] Fix
[ ] Refactor
[ x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@jeromecoutant @bulislaw @MarceloSalazar

Release Notes

Test result:

+-------------------+---------------+---------------------+-------------------------------------------------------+--------+--------+--------+--------------------+
| target            | platform_name | test suite          | test case                                             | passed | failed | result | elapsed_time (sec) |
+-------------------+---------------+---------------------+-------------------------------------------------------+--------+--------+--------+--------------------+
| DISCO_L4R9I-ARMC6 | DISCO_L4R9I   | tests-mbed_hal-qspi | qspi frequency setting test                           | 1      | 0      | OK     | 0.11               |
| DISCO_L4R9I-ARMC6 | DISCO_L4R9I   | tests-mbed_hal-qspi | qspi init/free test                                   | 1      | 0      | OK     | 0.07               |
| DISCO_L4R9I-ARMC6 | DISCO_L4R9I   | tests-mbed_hal-qspi | qspi memory id test                                   | 1      | 0      | OK     | 0.11               |
| DISCO_L4R9I-ARMC6 | DISCO_L4R9I   | tests-mbed_hal-qspi | qspi write(1-1-1)/x1  read(1-1-1)/x1  repeat/x1  test | 1      | 0      | OK     | 0.11               |
| DISCO_L4R9I-ARMC6 | DISCO_L4R9I   | tests-mbed_hal-qspi | qspi write(1-1-1)/x1  read(1-1-1)/x1  repeat/x4  test | 1      | 0      | OK     | 0.18               |
| DISCO_L4R9I-ARMC6 | DISCO_L4R9I   | tests-mbed_hal-qspi | qspi write(1-1-1)/x1  read(1-1-1)/x4  repeat/x1  test | 1      | 0      | OK     | 0.11               |
| DISCO_L4R9I-ARMC6 | DISCO_L4R9I   | tests-mbed_hal-qspi | qspi write(1-1-1)/x4  read(1-1-1)/x1  repeat/x1  test | 1      | 0      | OK     | 0.12               |
+-------------------+---------------+---------------------+-------------------------------------------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 7 OK
@LMESTM LMESTM force-pushed the LMESTM:STM32_OSPI_QSPI_fallback_support branch from 5c33726 to 2ebdb63 Aug 22, 2019
targets/targets.json Outdated Show resolved Hide resolved
@@ -34,6 +34,9 @@
"DISCO_F769NI": {
"QSPI_FREQ": "8000000"
},
"DISCO_L4R9I": {
"QSPI_FREQ": "84000000"

This comment has been minimized.

Copy link
@jeromecoutant

jeromecoutant Aug 22, 2019

Contributor

To remove as long as QSPIF is not supported ?


__HAL_RCC_OSPI2_CLK_ENABLE();

This comment has been minimized.

Copy link
@jeromecoutant

jeromecoutant Aug 22, 2019

Contributor

OSPI2 clock is used there. Maybe we could add some dependency on PeriphPin table ?

This comment has been minimized.

Copy link
@LMESTM

LMESTM Aug 23, 2019

Author Contributor

done and reviewed to be generic. Made changes to other families too.

targets/TARGET_STM/qspi_api.c Outdated Show resolved Hide resolved
@ciarmcom ciarmcom requested review from bulislaw and MarceloSalazar Aug 22, 2019
@ciarmcom

This comment has been minimized.

Copy link
Member

commented Aug 22, 2019

@ciarmcom ciarmcom requested review from ARMmbed/mbed-os-maintainers Aug 22, 2019
@LMESTM LMESTM force-pushed the LMESTM:STM32_OSPI_QSPI_fallback_support branch from 2ebdb63 to d4eaf6f Aug 23, 2019
@LMESTM

This comment has been minimized.

Copy link
Contributor Author

commented Aug 28, 2019

I've appended the PR with a few clean-up and a fix to manage QSPIM configuration.

@LMESTM LMESTM force-pushed the LMESTM:STM32_OSPI_QSPI_fallback_support branch from 86f3277 to 64b11c5 Aug 29, 2019
@LMESTM

This comment has been minimized.

Copy link
Contributor Author

commented Aug 29, 2019

I just added 2 commits with extra Pins definition for L4R5 target that we have used with Jerome for testing.

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2019

ci started

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 29, 2019

Test run: FAILED

Summary: 2 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 30, 2019

Known issue with CI, will restart

Copy link
Contributor

left a comment

Tested OK with NUCLEO_L4R5ZI and QSPI memory from L475 DISCO board.

@jeromecoutant

This comment has been minimized.

Copy link
Contributor

commented Aug 30, 2019

@bulislaw OSPI seems validated with STM32L4+

@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 30, 2019

CI restarted

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 30, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_cloud-client-test
@0xc0170

This comment has been minimized.

Copy link
Member

commented Sep 2, 2019

Client test restared, internal CI error

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Sep 2, 2019
@0xc0170 0xc0170 merged commit 940d3fd into ARMmbed:master Sep 2, 2019
25 checks passed
25 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(-24 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8628 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8464B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
@0xc0170 0xc0170 removed the ready for merge label Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.