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

QSPIFBlockDevice does not differentiate between mode (alt) and dummy cycles #11295

Closed
kyle-cypress opened this issue Aug 23, 2019 · 4 comments
Closed
Assignees

Comments

@kyle-cypress
Copy link

Description

When sending commands to the QSPI hal, QSPIFBlockDevice treats mode (alt) cycles as though they were dummy cycles. This causes problems on the PSOC6 targets where the data pins are tri-stated during the dummy cycles. This means that if the last value sent prior to the dummy cycles happens to also be a valid mode value for the memory in use, the memory part can wind up in an unexpected state.
For example, in QSPIFBlockDevice::_sfdp_detect_best_bus_read_mode:

_dummy_and_mode_cycles = (basic_param_table_ptr[QSPIF_BASIC_PARAM_TABLE_444_READ_INST_BYTE - 1] >> 5) 
      + (basic_param_table_ptr[QSPIF_BASIC_PARAM_TABLE_444_READ_INST_BYTE - 1] & 0x1F);

QSPIFBlockDevice should retain the mode cycle and dummy cycles as separate values and pass them separately to the QSPI hal driver (which already supports mode/alt bits as a separate entity).

The problem was reproduced using features-storage-tests-kvstore-static_tests built with GCC_ARM for CY8CPROTO_062_4343W, while attempting to test the addition of QSPI support for PSOC6 targets.

I will submit a pull request shortly with a proposed fix.

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug
@ciarmcom
Copy link
Member

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1661

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 23, 2019

+1 for the issue and the fix. We will review

@VeijoPesonen
Copy link
Contributor

@kyle-cypress This issue should be closed I assume.

@kyle-cypress
Copy link
Author

Yes, this is addressed by #11602. Thanks.

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

No branches or pull requests

6 participants