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] add programmable chip-select operations #954

Merged
merged 10 commits into from
Jul 20, 2024
Merged

[SPI] add programmable chip-select operations #954

merged 10 commits into from
Jul 20, 2024

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Jul 19, 2024

This PR provides a rework of the SPI module.

  • ✨ Add "programmable" chip-select enable(disable operations.
  • ⚠️ Change layout of SPI control registers (CTRL) / not binary compatible to previous versions.
  • ✔️ HAL functions remain unchanged / fully-backwards compatible.

Description

The chip-select lines of the SPI modules are not longer controlled by specific control register bits. Instead, these lines are controlled by new "commands" that are also written to the module's TX FIFO. Thus, entire SPI sequences can be programmed with any CPU interaction at all.

Example:

  • Enable chip-select line 4 (write command to TX FIFO)
  • Transmit N data bytes (write N data bytes to TX FIFO)
  • Disable all chip-select lines (write command to TX FIFO)

So the entire SPI transmission can programmed as one block. The CPU is free to do other work while the SPI module in handling chip-select enable/disable and data transmission. Optionally, an IRQ can be triggered when the SPI module has completed the "programmed" transfer.

@stnolting stnolting added enhancement New feature or request HW Hardware-related labels Jul 19, 2024
@stnolting stnolting self-assigned this Jul 19, 2024
@stnolting stnolting marked this pull request as ready for review July 19, 2024 19:41
@stnolting stnolting merged commit 050732f into main Jul 20, 2024
10 checks passed
@stnolting stnolting deleted the rework_spi branch July 20, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request HW Hardware-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant