13#ifndef APP_CONFIG_STM32_H_ 
   14#define APP_CONFIG_STM32_H_ 
   21#include "stm32_uart.h" 
   23#include "stm32_gpio.h" 
   27#include "stm32_gpio_irq.h" 
   39#define HW_CARRIER_NAME     SDP_K1 
   42#define APP_UART_HANDLE     &huart5 
   43#define UART_IRQ_ID     UART5_IRQn 
   44#define APP_UART_USB_HANDLE &hUsbDeviceHS 
   51#define GPIO_TRIGGER_INT_PORT   0 
   54#define SPI_DEVICE_ID       1  
   56#define STM32_SPI_CS_PORT   0   
   59#define I2C_DEVICE_ID       1  
   64#define TRIGGER_INT_ID       10 
   65#define trigger_gpio_handle  0 
   66#define LDAC_GPIO_PRIORITY   1 
   70#define LDAC_PWM_CHANNEL     3   
   71#define LDAC_PWM_CLK_DIVIDER 2  
   72#define PWM_GPIO_PORT       LDAC_PORT 
   73#define PWM_GPIO_PIN        LDAC_PIN 
   74#define LDAC_PWM_HANDLE     htim1 
   81#define TIMER_8_PRESCALER                  0 
   82#define TIMER_8_CLK_DIVIDER                2 
   83#define TIMER_CHANNEL_1                    1 
   84#define TIMER8_HANDLE                      htim8 
   86#define Rx_DMA_IRQ_ID        DMA2_Stream0_IRQn 
   87#define TxDMA_CHANNEL_NUM    DMA_CHANNEL_7 
   88#define RxDMA_CHANNEL_NUM    DMA_CHANNEL_3 
   90#define DMA_NUM_CHANNELS             2 
   93#define spi_extra_init_params   stm32_spi_init_params 
   94#define uart_extra_init_params  stm32_uart_init_params 
   95#define i2c_extra_init_params   stm32_i2c_init_params 
   96#define pwm_extra_init_params  stm32_ldac_pwm_init_params 
   97#define gpio_ldac_extra_init_params stm32_gpio_ldac_init_params 
   98#define gpio_reset_extra_init_params stm32_gpio_reset_init_params 
   99#define csb_gpio_extra_init_params stm32_csb_gpio_init_params 
  100#define trigger_gpio_irq_extra_params   stm32_trigger_gpio_irq_init_params 
  101#define gpio_pwm_extra_init_params  stm32_pwm_ldac_gpio_init_params 
  102#define tx_trigger_extra_init_params  stm32_tx_trigger_extra_init_params 
  103#define vcom_extra_init_params      stm32_vcom_extra_init_params 
  106#define trigger_gpio_irq_ops    stm32_gpio_irq_ops 
  107#define gpio_ops                stm32_gpio_ops 
  108#define spi_ops                 stm32_spi_ops 
  109#define pwm_ops                 stm32_pwm_ops 
  110#define uart_ops                stm32_uart_ops 
  111#define i2c_ops                 stm32_i2c_ops 
  112#define dma_ops                 stm32_dma_ops 
  113#define vcom_ops                stm32_usb_uart_ops 
  116#define MAX_SPI_SCLK            22500000 
  122#if (INTERFACE_MODE == SPI_INTERRUPT) 
  123#define MAX_SAMPLING_RATE               40000 
  124#define LDAC_PWM_DUTY_CYCLE_PERCENT     50 
  125#define LDAC_PWM_PRESCALER              3 
  127#define MAX_SAMPLING_RATE                560000 
  128#define MAX_SAMPLING_RATE_STREAMING_MODE 1400000 
  129#define LDAC_PULSE_WIDTH_NS              250 
  130#define LDAC_PWM_PRESCALER               3 
  134#define TX_TRIGGER_PERIOD          400 
  135#define TX_TRIGGER_DUTY_CYCLE_NS   50 
  140#define NUM_PULSE_REPETITIONS      3 
  153extern UART_HandleTypeDef 
huart5;
 
  157#if (INTERFACE_MODE == SPI_DMA) 
int stm32_timer_stop(void)
Stop generating timer signals.
Definition app_config_stm32.c:281
 
UART_HandleTypeDef huart5
 
#define TIMER8_HANDLE
Definition app_config_stm32.h:84
 
int stm32_timer_enable(void)
Starts the timer signal generation for PWM.
Definition app_config_stm32.c:258
 
struct stm32_gpio_init_param stm32_gpio_ldac_init_params
Definition app_config_stm32.c:59
 
DMA_HandleTypeDef hdma_tim8_ch1
 
struct stm32_pwm_init_param stm32_ldac_pwm_init_params
Definition app_config_stm32.c:77
 
struct stm32_dma_channel txdma_channel_single_instr_mode
Definition app_config_stm32.c:116
 
struct stm32_dma_channel rxdma_channel
Definition app_config_stm32.c:136
 
USBD_HandleTypeDef hUsbDeviceHS
 
struct stm32_spi_init_param stm32_spi_init_params
Definition app_config_stm32.c:48
 
void stm32_system_init(void)
Initialize the STM32 system peripherals.
Definition app_config_stm32.c:176
 
void tim8_config(void)
Configure Tx Trigger timer for slave mode operation, one-pulse mode and to generate DMA requests.
Definition app_config_stm32.c:245
 
void receivecomplete_callback(DMA_HandleTypeDef *hdma)
Callback function to flag the transfer of number of requested samples.
Definition app_config_stm32.c:340
 
#define LDAC_PWM_HANDLE
Definition app_config_stm32.h:74
 
struct stm32_gpio_init_param stm32_gpio_reset_init_params
Definition app_config_stm32.c:72
 
struct stm32_dma_channel txdma_channel_stream_mode
Definition app_config_stm32.c:126
 
struct stm32_pwm_init_param stm32_tx_trigger_extra_init_params
Definition app_config_stm32.c:99
 
int stm32_abort_dma_transfer(void)
Abort DMA Transfers.
Definition app_config_stm32.c:315
 
struct stm32_usb_uart_init_param stm32_vcom_extra_init_params
Definition app_config_stm32.c:38
 
DMA_HandleTypeDef hdma_spi1_rx
 
struct stm32_gpio_init_param stm32_pwm_ldac_gpio_init_params
Definition app_config_stm32.c:65
 
struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
Definition app_config_stm32.c:43
 
struct stm32_gpio_init_param stm32_csb_gpio_init_params
Definition app_config_stm32.c:93
 
struct stm32_uart_init_param stm32_uart_init_params
Definition app_config_stm32.c:33
 
struct stm32_i2c_init_param stm32_i2c_init_params
Definition app_config_stm32.c:54
 
int reconfig_stm32_params(void)
Reconfigure the STM32 specific system parameters with change in data streaming mode.
Definition app_config_stm32.c:217
 
Configuration file of nanodac firmware example program.
 
VCOM driver for stm32 as a no_os_uart implementation.
 
Specific initialization parameters for stm32 UART over USB.
Definition stm32_usb_uart.h:27