![]() |
API Reference
The NEORV32 RISC-V Processor
|
Serial memory controller (SMC) HW driver source file. More...
#include <neorv32.h>Functions | |
| int | neorv32_smc_available (void) |
| void | neorv32_smc_setup (int dual, int msize, int cdiv, int rwait, uint8_t rcmd, uint8_t wcmd, uint32_t icmd) |
| int | neorv32_smc_busy (void) |
| void | neorv32_smc_pins_enable (void) |
| void | neorv32_smc_pins_disable (void) |
| uint32_t | neorv32_smc_get_clockspeed (void) |
| uint32_t | neorv32_smc_get_baseaddr (void) |
Serial memory controller (SMC) HW driver source file.
| int neorv32_smc_available | ( | void | ) |
Check if SMC was synthesized.
| int neorv32_smc_busy | ( | void | ) |
Check if a SMC memory operation is in progress.
| uint32_t neorv32_smc_get_baseaddr | ( | void | ) |
Get configured SMC memory base address.
| uint32_t neorv32_smc_get_clockspeed | ( | void | ) |
Get configured SMC SPI clock speed in Hz.
| void neorv32_smc_pins_disable | ( | void | ) |
Disable SMC control of SMC IO pins.
| void neorv32_smc_pins_enable | ( | void | ) |
Enable SMC control of SMC IO pins.
| void neorv32_smc_setup | ( | int | dual, |
| int | msize, | ||
| int | cdiv, | ||
| int | rwait, | ||
| uint8_t | rcmd, | ||
| uint8_t | wcmd, | ||
| uint32_t | icmd ) |
Reset, configure and enable SMC.
| [in] | dual | Enable dual-chip mode (0,1). |
| [in] | msize | Memory chip size select (NEORV32_SMC_MSIZE_enum). |
| [in] | cdiv | Clock divider (3-bit); f_SPI = f_cpu/(2*(cdiv+1)). |
| [in] | rwait | Number of read access dummy/wait cycles (0..15). |
| [in] | rcmd | Memory chip read command (8-bit). |
| [in] | wcmd | Memory chip write command (8-bit). |
| [in] | icmd | Initialization commands (3x8-bit, LSB-aligned). |