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

applications: sdp: mspi: RX High frequency fix #21112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mif1-nordic
Copy link
Contributor

Modified hrt rx to work in quad mode up to 21.333333MHz.

@mif1-nordic mif1-nordic requested a review from a team as a code owner March 24, 2025 11:32
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Mar 24, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Mar 24, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 2

Inputs:

Sources:

sdk-nrf: PR head: 804cb68e80f9a59afca0ae25f0a411b255d4d3db

more details

sdk-nrf:

PR head: 804cb68e80f9a59afca0ae25f0a411b255d4d3db
merge base: 92550617bf50d65f4604349f9829582733d4390d
target head (main): cd4d01726addf0ee92d016037e4349cbb27445dd
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (2)
applications
│  ├── sdp
│  │  ├── mspi
│  │  │  ├── src
│  │  │  │  ├── hrt
│  │  │  │  │  ├── hrt-nrf54l15.s
│  │  │  │  │  │ hrt.c

Outputs:

Toolchain

Version: 4ffa2202d5
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:4ffa2202d5_8bf7ca4353

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 42
  • ✅ Integration tests
    • ✅ test-low-level
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_cloud
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

Copy link

You can find the documentation preview for this PR here.

Modified hrt rx to work in quad mode in 21.333333MHz.

Signed-off-by: Michal Frankiewicz <michal.frankiewicz@nordicsemi.no>
@masz-nordic masz-nordic added this to the 3.0.0 milestone Mar 24, 2025
@mif1-nordic mif1-nordic mentioned this pull request Mar 25, 2025
while (nrf_vpr_csr_vio_shift_cnt_in_get() > 0) {
}
/* Wait until timer 0 stops.
* counter stops 1 clock to early.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* counter stops 1 clock to early.
* counter stops 1 clock too early.

As it was before.

@@ -41,6 +41,34 @@ static nrf_vpr_csr_vio_shift_ctrl_t xfer_shift_ctrl = {
.in_mode = NRF_VPR_CSR_VIO_MODE_IN_CONTINUOUS,
};

NRF_STATIC_INLINE bool is_counter_running(uint8_t counter)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, to be more readable:

Suggested change
NRF_STATIC_INLINE bool is_counter_running(uint8_t counter)
NRF_STATIC_INLINE bool is_counter_running(uint8_t cnt_idx)

return cnt != nrf_vpr_csr_vtim_simple_counter_get(counter);
}

NRF_STATIC_INLINE uint32_t get_shift_count(volatile hrt_xfer_t *hrt_xfer_params,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I would change name of this function to something different, "get" may suggest it is read from a register. But I am not sure what, "calculate" does not fit either. Maybe something like get_next_shift_count?

Comment on lines +58 to +69
switch (word_count - *index) {
case 1: /* Last transfer */
(*index)++;
return SHIFTCNTB_VALUE(hrt_xfer_params->xfer_data[HRT_FE_DATA].last_word_clocks);
case 2: /* Last but one transfer */
(*index)++;
return SHIFTCNTB_VALUE(
hrt_xfer_params->xfer_data[HRT_FE_DATA].penultimate_word_clocks);
default:
(*index)++;
return SHIFTCNTB_VALUE(BITS_IN_WORD / hrt_xfer_params->bus_widths.data);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If index is incremented for every case, then why is it changed in this function? I think it would be better to do it outside and pass index directly, not by a pointer.

Comment on lines +355 to +356
* nrf_vpr_csr_vio_shift_cnt_in_get function inside while cannot be used because in
* higher frequencies shifting stops before it is called 1-st time.
Copy link
Contributor

Choose a reason for hiding this comment

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

English has a strict order of words in a sentence for a reason ;)

Suggested change
* nrf_vpr_csr_vio_shift_cnt_in_get function inside while cannot be used because in
* higher frequencies shifting stops before it is called 1-st time.
* nrf_vpr_csr_vio_shift_cnt_in_get function cannot be used inside while loop because at
* higher frequencies shifting stops before it is called the first time.

nrf_vpr_csr_vio_in_buffered_reversed_byte_get();
nrf_vpr_csr_vio_shift_ctrl_buffered_set(&rx_shift_ctrl);

for (uint32_t i = 0; i < word_count - 1; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You could start the for loop from i = 2, then index variable is not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants