Skip to content

Add reset internal state before call to HAL_QspiInit function #7586

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 1 commit into from
Jul 24, 2018

Conversation

adustm
Copy link
Member

@adustm adustm commented Jul 24, 2018

Description

This PR fixes an issue we noticed with @maciejbocianski during qspi_tests validation for ARM toolchain. (refer #7325)

2 variables in STM QSPI handle structure shall be initialized before the 1st call to HAL_QSPIInit function (at least the 1st call after the object creation)

hqspi->State shall be = HAL_QSPI_STATE_RESET
and hqspi->Lock shall be =HAL_UNLOCK

If the qspi object is created on the stack, it won't be zero-initialized and we don't know in advance the value of those 2 variables

With this PR, ARM test is passing

+-------------------------+---------------------+---------------------+--------+--------------------+-------------+
| target                  | platform_name       | test suite          | result | elapsed_time (sec) | copy_method |
+-------------------------+---------------------+---------------------+--------+--------------------+-------------+
| DISCO_L475VG_IOT01A-ARM | DISCO_L475VG_IOT01A | tests-mbed_hal-qspi | OK     | 41.5               | default     |
+-------------------------+---------------------+---------------------+--------+--------------------+-------------+

Pull request type

[x] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 24, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jul 24, 2018

Build : SUCCESS

Build number : 2662
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7586/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jul 24, 2018

@mbed-ci
Copy link

mbed-ci commented Jul 24, 2018

@cmonr cmonr merged commit 1c38d24 into ARMmbed:feature-qspi Jul 24, 2018
@0xc0170 0xc0170 removed the needs: CI label Jul 24, 2018
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

Successfully merging this pull request may close these issues.

6 participants