-
Notifications
You must be signed in to change notification settings - Fork 3k
hal-qspi test #7325
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
hal-qspi test #7325
Conversation
@@ -192,7 +192,8 @@ qspi_status_t qspi_init(qspi_t *obj, PinName io0, PinName io1, PinName io2, PinN | |||
qspi_status_t qspi_free(qspi_t *obj) | |||
{ | |||
// TODO | |||
return QSPI_STATUS_ERROR; | |||
//return QSPI_STATUS_ERROR; | |||
return QSPI_STATUS_OK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason, this function can't be fully implemented but required a temperate fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's temporary fix. It should be implemented
@adustm Please review
{ | ||
uint8_t reg_data[QSPI_STATUS_REGISTER_SIZE]; | ||
|
||
reg_data[0] = STATUS_BIT_QE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SFDP standard defines Quad Enable procedure depending on QER bits value.
This procedure of matches QER setup 010b where QE is bit 6 of status register.
Do we require a more general approach that handles Quad Enable for all QER value scenarios?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, could be done in next step.
But not sure if we really need such flexibility as SFDP provides in test layer.
The idea of QSPI tests was to check basic features, common for all targets/memory chips,
just to be sure that HAL API implementations works
@0xc0170 @SenRamakri
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@offirko This is utils functions for the driver test that has no SFDP knowledge. SFDP will be part of the device block driver (tested there). What would you suggest here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIU (regardless of SFDP), QE bit is frequently bit number 6 of Status Register - but not for all devices. 'quad_enable' will pass successfully because it verifies that bit 6 value has changed, but if further tests expect that quad_enable will enable QPI or FAST Quad mode they might fail for certain devices. We can perhaps start with this hard coded value and later on move to it to per-target configuration if required.
return ((reg[0] & STATUS_BIT_WEL) == 0 ? QSPI_STATUS_OK : QSPI_STATUS_ERROR); | ||
} | ||
|
||
WEAK void log_security_register(Qspi &qspi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of these log_xx_register functions? Why are they weak? Usually we don't have to print lot of data from tests, may be you need to confine them to debug builds only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was for debugging purpose, I'll remove it.
All weak function can be overridden if specific target require different handling
c11c8f8
to
c9b3b45
Compare
PR has been rebased and updated:
|
If all of the reviewers could re-review: |
Test code was updated. Changes was introduced as background for new memory chips support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a 4_4_4 QPI read mode test?
Thanks
{ | ||
uint8_t reg_data[QSPI_STATUS_REGISTER_SIZE]; | ||
|
||
reg_data[0] = STATUS_BIT_QE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIU (regardless of SFDP), QE bit is frequently bit number 6 of Status Register - but not for all devices. 'quad_enable' will pass successfully because it verifies that bit 6 value has changed, but if further tests expect that quad_enable will enable QPI or FAST Quad mode they might fail for certain devices. We can perhaps start with this hard coded value and later on move to it to per-target configuration if required.
@offirko BTW adding new configs is very easy since everything is parameterized |
Can we have CI on this one, please ? @cmonr |
/morph build |
Build : ABORTEDBuild number : 2535 |
Trying that again. |
Build : FAILUREBuild number : 2541 |
Test failed on some QSPI targets since only selected QSPI enabled targets support QSPI test. |
f13565f
to
24750d6
Compare
feature-qspi branch ant this PR have been rebased |
/morph build |
Hello @maciejbocianski |
/morph build |
Build : ABORTEDBuild number : 2624 |
Not sure why this ended up timing out, but please take a look at the build errors. |
QSPI feature was mistakenly moved form target nrf52840 to nrf52832 while rebasing. This change fixes it
There was mistake while rebasing. |
@maciejbocianski Been there. It happens. /morpg build |
/morph build |
Build : SUCCESSBuild number : 2627 Triggering tests/morph test |
Test : SUCCESSBuild number : 2374 |
Exporter Build : SUCCESSBuild number : 2266 |
@adustm |
great news. The only remaining problem I can see is the ARM toolchain
I can't find the fix for that at the moment (the issue disappears when opened with a debugger) |
On my side problem with ARM compiler also disappeared (after update to master) |
|
@adustm there was only one rebase a few days ago, and I'm using it (pure https://github.com/ARMmbed/mbed-os/tree/feature-qspi plus yours PR #7581) |
Hello,
PR#7586 has just arrived ;) Kind regards |
Description
This PR adds:
qspi_free
return value for STM QSPI implementationSupported targets:
DISCO_L475VG_IOT01A
,NRF52840_DK
Known issues:
qspi_free
implementationSTM_DISCO_L475VG_IOT01A_WRITE_4IO_BUG_WORKAROUND
)HAL_QSPI_Init
is failing on ARM compiler withHAL_BUSY
errorPull request type