Skip to content

Stm32 ospi qspi fallback support #11291

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

Merged
merged 4 commits into from
Sep 2, 2019

Conversation

LMESTM
Copy link
Contributor

@LMESTM LMESTM 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 STM32_OSPI_QSPI_fallback_support branch from 5c33726 to 2ebdb63 Compare August 22, 2019 13:34
@@ -34,6 +34,9 @@
"DISCO_F769NI": {
"QSPI_FREQ": "8000000"
},
"DISCO_L4R9I": {
"QSPI_FREQ": "84000000"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove as long as QSPIF is not supported ?


__HAL_RCC_OSPI2_CLK_ENABLE();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ciarmcom
Copy link
Member

@LMESTM, thank you for your changes.
@bulislaw @MarceloSalazar @ARMmbed/mbed-os-storage @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested review from a team August 22, 2019 15:00
@LMESTM LMESTM force-pushed the STM32_OSPI_QSPI_fallback_support branch from 2ebdb63 to d4eaf6f Compare August 23, 2019 09:31
@LMESTM
Copy link
Contributor Author

LMESTM 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 STM32_OSPI_QSPI_fallback_support branch from 86f3277 to 64b11c5 Compare August 29, 2019 11:55
@LMESTM
Copy link
Contributor Author

LMESTM 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
Copy link
Contributor

ci started

@mbed-ci
Copy link

mbed-ci 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
Copy link
Contributor

0xc0170 commented Aug 30, 2019

Known issue with CI, will restart

Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jeromecoutant
Copy link
Collaborator

@bulislaw OSPI seems validated with STM32L4+

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 30, 2019

CI restarted

@mbed-ci
Copy link

mbed-ci 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
Copy link
Contributor

0xc0170 commented Sep 2, 2019

Client test restared, internal CI error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants