NEORV32 - Software Framework Documentation
Loading...
Searching...
No Matches
neorv32_xip.h
Go to the documentation of this file.
1// ================================================================================ //
2// The NEORV32 RISC-V Processor - https://github.com/stnolting/neorv32 //
3// Copyright (c) NEORV32 contributors. //
4// Copyright (c) 2020 - 2024 Stephan Nolting. All rights reserved. //
5// Licensed under the BSD-3-Clause license, see LICENSE for details. //
6// SPDX-License-Identifier: BSD-3-Clause //
7// ================================================================================ //
8
18#ifndef neorv32_xip_h
19#define neorv32_xip_h
20
21/**********************************************************************/
26typedef volatile struct __attribute__((packed,aligned(4))) {
27 uint32_t CTRL;
28 const uint32_t reserved;
29 uint32_t DATA_LO;
30 uint32_t DATA_HI;
32
34#define NEORV32_XIP ((neorv32_xip_t*) (NEORV32_XIP_BASE))
35
65/**********************************************************************/
69int neorv32_xip_available(void);
70void neorv32_xip_setup(int prsc, int cdiv, int cpol, int cpha, uint8_t rd_cmd);
71int neorv32_xip_start(int abytes);
74uint32_t neorv32_xip_get_clock_speed(void);
75void neorv32_xip_spi_trans(int nbytes, uint64_t *rtx_data);
79#endif // neorv32_xip_h
int neorv32_xip_start(int abytes)
Definition neorv32_xip.c:87
void neorv32_xip_setup(int prsc, int cdiv, int cpol, int cpha, uint8_t rd_cmd)
Definition neorv32_xip.c:50
void neorv32_xip_highspeed_enable(void)
Definition neorv32_xip.c:117
NEORV32_XIP_CTRL_enum
Definition neorv32_xip.h:37
@ XIP_CTRL_SPI_NBYTES_LSB
Definition neorv32_xip.h:44
@ XIP_CTRL_EN
Definition neorv32_xip.h:38
@ XIP_CTRL_XIP_BUSY
Definition neorv32_xip.h:60
@ XIP_CTRL_RD_CMD_MSB
Definition neorv32_xip.h:50
@ XIP_CTRL_XIP_EN
Definition neorv32_xip.h:46
@ XIP_CTRL_CDIV2
Definition neorv32_xip.h:55
@ XIP_CTRL_XIP_ABYTES_MSB
Definition neorv32_xip.h:48
@ XIP_CTRL_SPI_CSEN
Definition neorv32_xip.h:51
@ XIP_CTRL_SPI_NBYTES_MSB
Definition neorv32_xip.h:45
@ XIP_CTRL_XIP_ABYTES_LSB
Definition neorv32_xip.h:47
@ XIP_CTRL_CDIV3
Definition neorv32_xip.h:56
@ XIP_CTRL_PRSC0
Definition neorv32_xip.h:39
@ XIP_CTRL_CDIV1
Definition neorv32_xip.h:54
@ XIP_CTRL_PHY_BUSY
Definition neorv32_xip.h:59
@ XIP_CTRL_BURST_EN
Definition neorv32_xip.h:58
@ XIP_CTRL_RD_CMD_LSB
Definition neorv32_xip.h:49
@ XIP_CTRL_PRSC2
Definition neorv32_xip.h:41
@ XIP_CTRL_CPOL
Definition neorv32_xip.h:42
@ XIP_CTRL_HIGHSPEED
Definition neorv32_xip.h:52
@ XIP_CTRL_CPHA
Definition neorv32_xip.h:43
@ XIP_CTRL_PRSC1
Definition neorv32_xip.h:40
@ XIP_CTRL_CDIV0
Definition neorv32_xip.h:53
uint32_t neorv32_xip_get_clock_speed(void)
Definition neorv32_xip.c:137
void neorv32_xip_spi_trans(int nbytes, uint64_t *rtx_data)
Definition neorv32_xip.c:168
void neorv32_xip_highspeed_disable(void)
Definition neorv32_xip.c:126
int neorv32_xip_available(void)
Definition neorv32_xip.c:27
Definition neorv32_xip.h:26
uint32_t DATA_HI
Definition neorv32_xip.h:30
uint32_t CTRL
Definition neorv32_xip.h:27
const uint32_t reserved
Definition neorv32_xip.h:28
uint32_t DATA_LO
Definition neorv32_xip.h:29