-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Cypress: Remove qspi_frequency() call. #12038
Conversation
cy_qspi_frequency is not implemented. This change is made because for compatibility reason with upcoming cy_hal changes.
@yarbcy, thank you for your changes. |
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.
frequency is not implemented? How to change bus freq?
will freq be implemented? |
|
QSPI frequency depends on CLK_FH2, which (in current implementation of BSPs) rely on divided by 2 FLL, which is configured to 100 MHz : In order to change QSPI bus frequency, user need to change source clock for HF2 and its divider, but this will not give precise clock adjusting unless you change FLL or PLL parameters, which can influence other (non-QSPI related) clocks. |
Unfortunate to have such dependency in the clocks. In this case, returning
Rather return an error, so a user knows t his is not supported. Ideally there would be not supported or similar error code, as it's not there yet, lets return an error. |
@@ -38,7 +38,8 @@ qspi_status_t qspi_free(qspi_t *obj) | |||
|
|||
qspi_status_t qspi_frequency(qspi_t *obj, int hz) | |||
{ | |||
return CY_RSLT_SUCCESS == cyhal_qspi_set_frequency(&(obj->hal_qspi), (uint32_t)hz) ? QSPI_STATUS_OK : QSPI_STATUS_ERROR; | |||
/* Return OK since this API is not implemented in cy_hal */ | |||
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.
QSPI_STATUS_ERROR
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.
TESTS/mbed_hal/qspi/main.cpp line 261 will fail:
ret = qspi_frequency(&qspi.handle, frequency);
What should we do in this case?
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 see, this function should always return TRUE as it should be implemented 🙄
Lets leave it as it is, this should get fixed once we have capabilities
To summarize, a user need to recreate bsp for this target to change QSPI frequency, as it has other dependencies to the system ? |
Cypress has targets\TARGET_Cypress\TARGET_PSOC6\psoc6csp\hal\src\cyhal_system.c APIs to work with clocks, where user can adjust FLL/PLL and HF dividers parameters in order to change QSPI frequency. Changing FLL/PLL may require reinitialization of drivers, that are rely on them. |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@Mergifyio backport mbed-os-5.15 |
Command
|
1 similar comment
Command
|
cy_qspi_frequency is not implemented. This change is made because for compatibility reason with upcoming cy_hal changes.
* upstream/mbed-os-5.15: (45 commits) Revert "Backport ARMmbed#12603: Add CYSBSYSKIT_01" Update STM32 EMAC driver based on review Update STM32 EMAC driver - limit RX frame length WHD: Remove an assert from get_rssi() crypto: Use updated ECC curve macros crypto: Update the service for Mbed Crypto 3.x crypto: Upgrade to Mbed Crypto 3.1.0 tls: Upgrade to Mbed TLS 2.20.0 Backport ARMmbed#12701: Custom BT Firmware for CYW9P62S1_43012EVB_01 Backport ARMmbed#12603: Add CYSBSYSKIT_01 Backport ARMmbed#12492: Update psoc6cm0p to version 1.1.1. Backport ARMmbed#12422: Cypress Asset Update Backport ARMmbed#12421: Cypress target reorganization Backport ARMmbed#12394: Fix Cypress 1M SDIO + other minor bugs Backport ARMmbed#12097: Cypress: Fix IAR Warnings Backport ARMmbed#12052: Fix for ARM issue 11859. Backport ARMmbed#12038: Remove qspi_frequency() call. Backport ARMmbed#12019: rework cypress lptimer hal Cellular: ALT1250 PPP cellular driver for mbed-os 5.15 RZ_A1H and GR_LYCHEE: Enable bootloader support (Mbed OS 5.15) ...
Summary of changes
Cypress: Remove qspi_frequency() call. cy_qspi_frequency is not implemented.
This change is made because for compatibility reason with upcoming cy_hal changes.
Impact of changes
Cypress
Migration actions required
Documentation
Pull request type
Test results
CY8CKIT_062_WIFI_BT.txt
Reviewers