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

Spi support #3

Merged
merged 28 commits into from
Jul 3, 2024
Merged

Spi support #3

merged 28 commits into from
Jul 3, 2024

Conversation

HaoboGu
Copy link
Contributor

@HaoboGu HaoboGu commented Jun 24, 2024

No description provided.

@HaoboGu HaoboGu marked this pull request as ready for review June 24, 2024 12:03
@HaoboGu HaoboGu requested a review from andelf June 30, 2024 08:25
HaoboGu added 14 commits July 3, 2024 01:41
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: HaoboGu <haobogu@outlook.com>
Signed-off-by: HaoboGu <haobogu@outlook.com>
Signed-off-by: HaoboGu <haobogu@outlook.com>
Signed-off-by: HaoboGu <haobogu@outlook.com>
Signed-off-by: HaoboGu <haobogu@outlook.com>
Signed-off-by: HaoboGu <haobogu@outlook.com>
Signed-off-by: HaoboGu <haobogu@outlook.com>
Signed-off-by: HaoboGu <haobogu@outlook.com>
Signed-off-by: HaoboGu <haobogu@outlook.com>
@andelf
Copy link
Collaborator

andelf commented Jul 2, 2024

Rebased. Leave the remaining fix to me.🤗

@andelf
Copy link
Collaborator

andelf commented Jul 2, 2024

Changes (mainly in d4cb3e6)

  • Define some enums in metapac crate (hpm-data commit: andelf/hpm-data@91d96e7)
  • rename addr_width data_width to _phrase for improved clarity and consistency.
  • Remove unused enums
  • Incorporated the SpiMode enum and the MODE_0 constant from the embedded-hal crate, aligning the implementation with established standards.
  • Group timing config into Timings. The field enum types might be stripped out as well(in future refactor)

@andelf
Copy link
Collaborator

andelf commented Jul 3, 2024

@HaoboGu

Final changes

  • CS pins are bonded to the QSPI driver, not the ordinary SPI driver(leaving it a SpiBus)
  • transfer and transfer_inplace are fixed, leaving some minor optimization undone
  • The bug for tx is located: Due to the L1 cache being enabled, blocking_write returns very early before fifo finishes writing. So it must wait for fifo empty(I choose spiactive for better busy/idle wait)
  • Freq calc is changed, if a specific freq is not possible, a lower one(higher clk_div) will be selected
  • Remove most enum definitions. use "word size" definition from the dma part

@andelf andelf merged commit 9af391d into master Jul 3, 2024
1 check passed
@andelf andelf deleted the feat/spi branch July 3, 2024 18:56
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.

2 participants