Skip to content

xtensa/esp32s3: Add timing delay set interface for QSPI#13277

Merged
xiaoxiang781216 merged 1 commit intoapache:masterfrom
Kevin-Zhou11:qspi_timing_delay_intf
Sep 5, 2024
Merged

xtensa/esp32s3: Add timing delay set interface for QSPI#13277
xiaoxiang781216 merged 1 commit intoapache:masterfrom
Kevin-Zhou11:qspi_timing_delay_intf

Conversation

@Kevin-Zhou11
Copy link
Copy Markdown
Contributor

Summary

When esp32s3 read from slave device through qspi, the data input signal has timing delay compared to clock signal, the higher the SPI frequency, the more impact to SPI sampling data, cause to receive wrong data.
esp32s3 has SPI timing compensation for this Scenario, add interface qspi driver to set timing compensation for the delay.

Impact

No impact

Testing

Build with esp32s3-devkit, test with project board.

@tmedicci
Copy link
Copy Markdown
Contributor

tmedicci commented Sep 3, 2024

Hi @Kevin-Zhou11 , thanks for the submission!

I will test it on our internal CI. Please wait to merge it.

Copy link
Copy Markdown
Contributor

@tmedicci tmedicci left a comment

Choose a reason for hiding this comment

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

Internal CI testing passed successfully. Where are these interfaces are being used?

Comment thread arch/xtensa/src/esp32s3/esp32s3_qspi.c Outdated
Comment thread arch/xtensa/src/esp32s3/esp32s3_qspi.c Outdated
Comment thread arch/xtensa/src/esp32s3/esp32s3_qspi.c Outdated
Comment thread arch/xtensa/src/esp32s3/esp32s3_qspi.h Outdated
@Kevin-Zhou11
Copy link
Copy Markdown
Contributor Author

@tmedicci, thanks for your review.

Internal CI testing passed successfully. Where are these interfaces are being used?

Our project has timing delayed issue, I call this interface in slave driver (such lan9250) after qspi initialize, below is an example.

  g_dev = esp32s3_qspibus_initialize(port);
  if (!g_dev)
    {
      nerr("ERROR: Failed to initialize QSPI port %d\n", port);
      return -ENODEV;
    }

  ret = esp32s3_qspibus_set_delay(g_dev, 1, 0, 0);
  if (ret < 0)
    {
      nerr("ERROR: Failed to set delay timing, ret=%d\n", ret);
    }

@Kevin-Zhou11 Kevin-Zhou11 force-pushed the qspi_timing_delay_intf branch from c93b2af to 787abbf Compare September 4, 2024 14:14
@Kevin-Zhou11
Copy link
Copy Markdown
Contributor Author

@acassis, thanks for your review.

I have fixed the alignment issue, please check.

@xiaoxiang781216 xiaoxiang781216 merged commit fc6bcd6 into apache:master Sep 5, 2024
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.

4 participants