FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
udma_hyperbus.h File Reference

Macros

#define MEM_ACCESS
 
#define REG_ACCESS
 
#define RAM_ADDR
 
#define FLASH_ADDR
 
#define TYPE_OCTOSPI
 
#define TYPE_HYPERBUS
 
#define HYPERRAM
 
#define HYPERFLASH
 
#define HYPER_IRQ_DISABLE
 
#define HYPER_IRQ_ENABLE
 
#define HYPER_MODE_AUTO_ENABLE
 
#define HYPER_MODE_AUTO_DISABLE
 
#define HYPER_MODE_XIP_ENABLE
 
#define HYPER_MODE_XIP_DISABLE
 
#define HYPER_BURST_2D_ENABLE
 
#define HYPER_2D_MODE_1D_1D
 
#define HYPER_2D_MODE_1D_2D
 
#define HYPER_2D_MODE_2D_1D
 
#define HYPER_2D_MODE_2D_2D
 

Functions

static void hal_udma_hyperbus_rx_dest_set (uint32_t device_id, int32_t udma_chan_id)
 
static uint32_t hal_udma_hyperbus_rx_dest_get (uint32_t device_id)
 
static void hal_udma_hyperbus_tx_dest_set (uint32_t device_id, int32_t udma_chan_id)
 
static uint32_t hal_udma_hyperbus_tx_dest_get (uint32_t device_id)
 
static void hal_udma_hyperbus_transfert_mode_set (uint32_t device_id, uint8_t auto_ena, uint8_t xip_ena)
 
static void hal_udma_hyperbus_transfert_addr_set (uint32_t device_id, uint32_t addr)
 
static void hal_udma_hyperbus_transfert_size_set (uint32_t device_id, uint32_t size)
 
static void hal_udma_hyperbus_transfert_cfg_set (uint32_t device_id, uint8_t rxtx, uint8_t start)
 
static void hal_udma_hyperbus_ext_addr_set (uint32_t device_id, uint32_t ext_addr, uint8_t access)
 
static uint32_t hal_udma_hyperbus_timing_get (uint32_t device_id)
 
static void hal_udma_hyperbus_timing_set (uint32_t device_id, uint16_t latency_0, uint16_t latency_1, uint8_t rw_recovery, uint8_t rwds_delay, uint8_t autocheck, uint16_t cs_max)
 
static void hal_udma_hyperbus_timing_mask_set (uint32_t device_id, uint32_t timing_mask)
 
static void hal_udma_hyperbus_mba0_set (uint32_t device_id, uint32_t addr)
 
static void hal_udma_hyperbus_mba1_set (uint32_t device_id, uint32_t addr)
 
static void hal_udma_hyperbus_device_type_set (uint32_t device_id, uint8_t type, uint8_t dt0_dev)
 
static void hal_udma_hyperbus_ospi_cmd_set (uint32_t device_id, uint8_t cs, uint16_t cmd)
 
static void hal_udma_hyperbus_ospi_alter_set (uint32_t device_id, uint8_t cs, uint16_t mode)
 
static void hal_udma_hyperbus_ospi_cfg_set (uint32_t device_id, uint8_t cmd_size, uint8_t addr_size, uint8_t lines, uint8_t cmd_dtr, uint8_t addr_dtr, uint8_t data_dtr, uint8_t data_dtr_msb)
 
static void hal_udma_hyperbus_ospi_cfg_mask_set (uint32_t device_id, uint8_t cs, uint32_t ospi_cfg_mask)
 
static void hal_udma_hyperbus_ospi_cmd_xip_set (uint32_t device_id, uint8_t cs, uint16_t cmd)
 
static void hal_udma_hyperbus_ospi_alter_xip_set (uint32_t device_id, uint8_t cs, uint16_t mode)
 
static void hal_udma_hyperbus_ospi_cfg_xip_set (uint32_t device_id, uint8_t cmd_size, uint8_t addr_size, uint8_t lines, uint8_t cmd_dtr, uint8_t addr_dtr, uint8_t data_dtr, uint8_t data_dtr_msb)
 
static void hal_udma_hyperbus_ospi_cfg_mask_xip_set (uint32_t device_id, uint8_t cs, uint32_t ospi_cfg_mask)
 
static uint32_t hal_udma_hyperbus_ospi_csn_get (uint32_t device_id)
 
static void hal_udma_hyperbus_ospi_csn_set (uint32_t device_id, uint8_t csn, uint8_t auto_en, uint8_t direct_ctrl, uint8_t csn_state)
 
static void hal_udma_hyperbus_ospi_csn_mask_set (uint32_t device_id, uint32_t ospi_csn_mask)
 
static void hal_udma_hyperbus_ospi_jedec_reset_set (uint32_t device_id, uint8_t ena, uint8_t sdo0_val)
 
static uint32_t hal_udma_hyperbus_ospi_ram_opt_get (uint32_t device_id)
 
static void hal_udma_hyperbus_ospi_ram_opt_mask_set (uint32_t device_id, uint32_t ram_opt_mask)
 
static void hal_udma_hyperbus_ospi_ram_opt_set (uint32_t device_id, uint8_t opt_read_en, uint8_t real_addr, uint8_t psram_read_bit, uint8_t psram_read_cmd, uint8_t psram_addr_even, uint8_t psram_cross_bound)
 
static void hal_udma_hyperbus_line_2d_set (uint32_t device_id, uint32_t line)
 
static void hal_udma_hyperbus_stride_2d_set (uint32_t device_id, uint32_t stride)
 
static void hal_udma_hyperbus_burst_enable (uint32_t device_id, uint8_t burst_type)
 
static void hal_udma_hyperbus_burst_disable (uint32_t device_id, uint8_t burst_type)
 
static void hal_udma_hyperbus_burst_cfg_set (uint32_t device_id, uint32_t burst_cfg)
 
static void hal_udma_hyperbus_irq_enable (uint32_t device_id)
 
static void hal_udma_hyperbus_irq_disable (uint32_t device_id)
 
static void hal_udma_hyperbus_clk_div_set (uint32_t device_id, uint8_t clk_div)
 
static uint32_t hal_udma_hyperbus_status_get (uint32_t device_id)
 
static void hal_udma_hyperbus_2d_enqueue (uint32_t device_id, uint32_t ext_addr, uint32_t l2_buf_0, uint32_t l2_buf_1, uint32_t size, uint32_t stride, uint32_t length, uint32_t cfg, uint8_t access, udma_channel_e channel)
 
static void hal_udma_hyperbus_transfer_2d_auto (uint32_t device_id, uint32_t ext_addr, uint32_t l2_buf0, uint32_t size, uint32_t stride, uint32_t length, uint32_t rxtx, uint32_t burst_cfg, uint8_t clk_div)
 

Macro Definition Documentation

#define HYPER_2D_MODE_1D_1D
#define HYPER_2D_MODE_1D_2D
#define HYPER_2D_MODE_2D_1D
#define HYPER_2D_MODE_2D_2D
#define HYPER_BURST_2D_ENABLE
#define HYPER_IRQ_DISABLE
#define HYPER_IRQ_ENABLE
#define HYPER_MODE_AUTO_DISABLE
#define HYPER_MODE_AUTO_ENABLE
#define HYPER_MODE_XIP_DISABLE
#define HYPER_MODE_XIP_ENABLE
#define HYPERFLASH

Referenced by __pi_hyper_settings().

#define MEM_ACCESS
#define RAM_ADDR

Referenced by __pi_hyper_settings().

#define REG_ACCESS
#define TYPE_HYPERBUS

Referenced by __pi_hyper_settings().

#define TYPE_OCTOSPI

Function Documentation

static void hal_udma_hyperbus_2d_enqueue ( uint32_t  device_id,
uint32_t  ext_addr,
uint32_t  l2_buf_0,
uint32_t  l2_buf_1,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
uint32_t  cfg,
uint8_t  access,
udma_channel_e  channel 
)
inlinestatic
static void hal_udma_hyperbus_burst_cfg_set ( uint32_t  device_id,
uint32_t  burst_cfg 
)
inlinestatic
static void hal_udma_hyperbus_burst_disable ( uint32_t  device_id,
uint8_t  burst_type 
)
inlinestatic
static void hal_udma_hyperbus_burst_enable ( uint32_t  device_id,
uint8_t  burst_type 
)
inlinestatic
static void hal_udma_hyperbus_clk_div_set ( uint32_t  device_id,
uint8_t  clk_div 
)
inlinestatic
static void hal_udma_hyperbus_device_type_set ( uint32_t  device_id,
uint8_t  type,
uint8_t  dt0_dev 
)
inlinestatic
static void hal_udma_hyperbus_ext_addr_set ( uint32_t  device_id,
uint32_t  ext_addr,
uint8_t  access 
)
inlinestatic
static void hal_udma_hyperbus_irq_disable ( uint32_t  device_id)
inlinestatic
static void hal_udma_hyperbus_irq_enable ( uint32_t  device_id)
inlinestatic

IRQ_EN Register.

References HYPER_IRQ_ENABLE, udma_hyper, and udma_hyper_irq_en_set().

Referenced by __pi_hyper_open(), and __pi_octospi_open().

static void hal_udma_hyperbus_line_2d_set ( uint32_t  device_id,
uint32_t  line 
)
inlinestatic

LINE_2D Register.

References udma_hyper, and udma_hyper_line_2d_set().

Referenced by hal_udma_hyperbus_transfer_2d_auto().

static void hal_udma_hyperbus_mba0_set ( uint32_t  device_id,
uint32_t  addr 
)
inlinestatic
static void hal_udma_hyperbus_mba1_set ( uint32_t  device_id,
uint32_t  addr 
)
inlinestatic
static void hal_udma_hyperbus_ospi_alter_set ( uint32_t  device_id,
uint8_t  cs,
uint16_t  mode 
)
inlinestatic
static void hal_udma_hyperbus_ospi_alter_xip_set ( uint32_t  device_id,
uint8_t  cs,
uint16_t  mode 
)
inlinestatic
static void hal_udma_hyperbus_ospi_cfg_mask_set ( uint32_t  device_id,
uint8_t  cs,
uint32_t  ospi_cfg_mask 
)
inlinestatic
static void hal_udma_hyperbus_ospi_cfg_mask_xip_set ( uint32_t  device_id,
uint8_t  cs,
uint32_t  ospi_cfg_mask 
)
inlinestatic
static void hal_udma_hyperbus_ospi_cfg_set ( uint32_t  device_id,
uint8_t  cmd_size,
uint8_t  addr_size,
uint8_t  lines,
uint8_t  cmd_dtr,
uint8_t  addr_dtr,
uint8_t  data_dtr,
uint8_t  data_dtr_msb 
)
inlinestatic
static void hal_udma_hyperbus_ospi_cfg_xip_set ( uint32_t  device_id,
uint8_t  cmd_size,
uint8_t  addr_size,
uint8_t  lines,
uint8_t  cmd_dtr,
uint8_t  addr_dtr,
uint8_t  data_dtr,
uint8_t  data_dtr_msb 
)
inlinestatic
static void hal_udma_hyperbus_ospi_cmd_set ( uint32_t  device_id,
uint8_t  cs,
uint16_t  cmd 
)
inlinestatic
static void hal_udma_hyperbus_ospi_cmd_xip_set ( uint32_t  device_id,
uint8_t  cs,
uint16_t  cmd 
)
inlinestatic
static uint32_t hal_udma_hyperbus_ospi_csn_get ( uint32_t  device_id)
inlinestatic

OSPI_CSN Register.

References udma_hyper, and udma_hyper_ospi_csn_get().

Referenced by __pi_octospi_device_settings_set().

static void hal_udma_hyperbus_ospi_csn_mask_set ( uint32_t  device_id,
uint32_t  ospi_csn_mask 
)
inlinestatic
static void hal_udma_hyperbus_ospi_csn_set ( uint32_t  device_id,
uint8_t  csn,
uint8_t  auto_en,
uint8_t  direct_ctrl,
uint8_t  csn_state 
)
inlinestatic
static void hal_udma_hyperbus_ospi_jedec_reset_set ( uint32_t  device_id,
uint8_t  ena,
uint8_t  sdo0_val 
)
inlinestatic
static uint32_t hal_udma_hyperbus_ospi_ram_opt_get ( uint32_t  device_id)
inlinestatic

OSPI_RAM_OPT Register.

References udma_hyper, and udma_hyper_ospi_ram_opt_get().

static void hal_udma_hyperbus_ospi_ram_opt_mask_set ( uint32_t  device_id,
uint32_t  ram_opt_mask 
)
inlinestatic
static void hal_udma_hyperbus_ospi_ram_opt_set ( uint32_t  device_id,
uint8_t  opt_read_en,
uint8_t  real_addr,
uint8_t  psram_read_bit,
uint8_t  psram_read_cmd,
uint8_t  psram_addr_even,
uint8_t  psram_cross_bound 
)
inlinestatic
static uint32_t hal_udma_hyperbus_rx_dest_get ( uint32_t  device_id)
inlinestatic
static void hal_udma_hyperbus_rx_dest_set ( uint32_t  device_id,
int32_t  udma_chan_id 
)
inlinestatic
static uint32_t hal_udma_hyperbus_status_get ( uint32_t  device_id)
inlinestatic

STATUS Register.

References udma_hyper, and udma_hyper_status_get().

Referenced by __pi_hyper_handler_irq(), and __pi_octospi_irq_handler().

static void hal_udma_hyperbus_stride_2d_set ( uint32_t  device_id,
uint32_t  stride 
)
inlinestatic

STRIDE_2D Register.

References udma_hyper, and udma_hyper_stride_2d_set().

Referenced by hal_udma_hyperbus_transfer_2d_auto().

static uint32_t hal_udma_hyperbus_timing_get ( uint32_t  device_id)
inlinestatic

TIMING_CFG Register.

References udma_hyper, and udma_hyper_timing_cfg_get().

Referenced by __pi_octospi_ospi_config_set().

static void hal_udma_hyperbus_timing_mask_set ( uint32_t  device_id,
uint32_t  timing_mask 
)
inlinestatic
static void hal_udma_hyperbus_timing_set ( uint32_t  device_id,
uint16_t  latency_0,
uint16_t  latency_1,
uint8_t  rw_recovery,
uint8_t  rwds_delay,
uint8_t  autocheck,
uint16_t  cs_max 
)
inlinestatic
static void hal_udma_hyperbus_transfer_2d_auto ( uint32_t  device_id,
uint32_t  ext_addr,
uint32_t  l2_buf0,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
uint32_t  rxtx,
uint32_t  burst_cfg,
uint8_t  clk_div 
)
inlinestatic
static void hal_udma_hyperbus_transfert_addr_set ( uint32_t  device_id,
uint32_t  addr 
)
inlinestatic

TRANS_ADDR Register.

References udma_hyper, and udma_hyper_trans_addr_set().

Referenced by hal_udma_hyperbus_transfer_2d_auto().

static void hal_udma_hyperbus_transfert_cfg_set ( uint32_t  device_id,
uint8_t  rxtx,
uint8_t  start 
)
inlinestatic
static void hal_udma_hyperbus_transfert_mode_set ( uint32_t  device_id,
uint8_t  auto_ena,
uint8_t  xip_ena 
)
inlinestatic
static void hal_udma_hyperbus_transfert_size_set ( uint32_t  device_id,
uint32_t  size 
)
inlinestatic

TRANS_SIZE Register.

References udma_hyper, and udma_hyper_trans_size_set().

Referenced by hal_udma_hyperbus_transfer_2d_auto().

static uint32_t hal_udma_hyperbus_tx_dest_get ( uint32_t  device_id)
inlinestatic
static void hal_udma_hyperbus_tx_dest_set ( uint32_t  device_id,
int32_t  udma_chan_id 
)
inlinestatic