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 & XIP] add high-speed SPI mode option #251

Merged
merged 4 commits into from
Jan 7, 2022
Merged

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Jan 7, 2022

This PR adds a "high-speed" SPI mode to the SPI and the XIP module. When enabled, the default three-bit clock prescaler select is ignored and the SPI clock operates at maximum speed, which is half of the processor clock (processor_clk / 2). Note: using only the clock prescaler select the maximum SPI clock frequency is processor_clk / 4.

To enable the high-speed SPI mode a new flag has been added to the modules control register (those bits were previously unused):

  • NEORV32_SPI.CTRL bit 16 "SPI_CTRL_HIGHSPEED"
  • NEORV32_XIP.CTRL bit 26 "XIP_CTRL_HIGHSPEED"

High-speed mode enable and disable functions have been added to the according software libraries.

✔️ This PR is fully backwards-compatible.

when enabled SPI clock runs at half of processor clock
@stnolting stnolting added enhancement New feature or request HW hardware-related labels Jan 7, 2022
@stnolting stnolting self-assigned this Jan 7, 2022
@stnolting stnolting marked this pull request as ready for review January 7, 2022 11:42
@stnolting stnolting merged commit db9eb1c into master Jan 7, 2022
@stnolting stnolting deleted the spi_xip_highspeed_mode branch January 7, 2022 17:10
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.

None yet

1 participant