13#ifndef APP_CONFIG_STM32_H_ 
   14#define APP_CONFIG_STM32_H_ 
   21#include "stm32_uart.h" 
   23#include "stm32_gpio.h" 
   26#include "stm32_gpio_irq.h" 
   36#define HW_CARRIER_NAME     SDP_K1 
   39#define APP_UART_HANDLE     &huart5 
   40#define UART_IRQ_ID     UART5_IRQn 
   47#define GPIO_TRIGGER_INT_PORT   1  
   48#define SPI_DMA_TX_STOP_PWM_GPIO_PIN    12  
   49#define SPI_DMA_TX_STOP_PWM_GPIO_PORT   3  
   52#define SPI_DEVICE_ID       1  
   54#define STM32_SPI_CS_PORT   0   
   58#define TRIGGER_INT_ID       15  
   59#define trigger_gpio_handle  0 
   60#define LDAC_GPIO_PRIORITY   1 
   64#define LDAC_PWM_CHANNEL     2  
   65#define LDAC_PWM_CLK_DIVIDER 2  
   66#define LDAC_PWM_HANDLE      htim12 
   69#define SPI_DMA_TX_STOP_PWM_ID   4  
   70#define SPI_DMA_TX_STOP_PWM_PRESCALER   0 
   71#define SPI_DMA_TX_STOP_PWM_CHANNEL     1  
   72#define SPI_DMA_TX_STOP_PWM_CLK_DIVIDER 2  
   73#define SPI_DMA_TX_STOP_PWM_HANDLE      htim4 
   76#define spi_extra_init_params   stm32_spi_init_params 
   77#define spi_extra_init_params_without_sw_csb    stm32_spi_init_params_without_sw_csb 
   78#define uart_extra_init_params  stm32_uart_init_params 
   79#define ldac_pwm_extra_init_params  stm32_ldac_pwm_init_params 
   80#define spi_dma_tx_stop_pwm_extra_init_params   stm32_spi_dma_tx_stop_pwm_init_params 
   81#define gpio_ldac_extra_init_params stm32_gpio_ldac_init_params 
   82#define spi_dma_tx_stop_pwm_gpio_extra_init_params  stm32_spi_dma_tx_stop_pwm_gpio_init_params 
   83#define gpio_reset_extra_init_params stm32_gpio_reset_init_params 
   84#define ext_int_extra_init_params   stm32_trigger_gpio_irq_init_params 
   87#define irq_platform_ops    stm32_gpio_irq_ops 
   88#define gpio_ops            stm32_gpio_ops 
   89#define spi_ops             stm32_spi_ops 
   90#define pwm_ops             stm32_pwm_ops 
   91#define uart_ops            stm32_uart_ops 
   97#if (INTERFACE_MODE == SPI_DMA) 
   98#define MAX_SAMPLING_RATE       274423 
   99#define LDAC_PWM_DUTY_CYCLE     99 
  100#define MAX_SPI_SCLK        11250000 
  101#define LDAC_PWM_PRESCALER   0 
  102#define SPI_DMA_TX_STOP_PWM_DUTY_CYCLE   50 
  104#define MAX_SAMPLING_RATE       21593 
  105#define LDAC_PWM_DUTY_CYCLE     50 
  106#define MAX_SPI_SCLK        22500000 
  107#define LDAC_PWM_PRESCALER   3 
  118extern struct stm32_gpio_init_param
 
  123extern UART_HandleTypeDef 
huart5;
 
  124extern SPI_HandleTypeDef 
hspi1;
 
  125extern TIM_HandleTypeDef 
htim4;
 
  126extern TIM_HandleTypeDef 
htim12;
 
  130                 struct iio_device_data* iio_dev_data, uint16_t num_of_bytes_transfer,
 
UART_HandleTypeDef huart5
 
struct stm32_gpio_init_param stm32_gpio_ldac_init_params
Definition app_config_stm32.c:59
 
struct stm32_pwm_init_param stm32_ldac_pwm_init_params
Definition app_config_stm32.c:77
 
struct stm32_spi_init_param stm32_spi_init_params
Definition app_config_stm32.c:48
 
struct stm32_gpio_init_param stm32_gpio_reset_init_params
Definition app_config_stm32.c:72
 
struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
Definition app_config_stm32.c:43
 
struct stm32_uart_init_param stm32_uart_init_params
Definition app_config_stm32.c:33
 
#define NUMBER_OF_CHANNELS
Definition app_config.h:83
 
struct stm32_pwm_init_param stm32_spi_dma_tx_stop_pwm_init_params
Definition app_config_stm32.c:83
 
struct stm32_spi_init_param stm32_spi_init_params_without_sw_csb
Definition app_config_stm32.c:46
 
uint32_t spi_dma_tx_stop_pwm_frquency[NUMBER_OF_CHANNELS]
Definition app_config_stm32.h:127
 
int32_t stm32_spi_dma_enable(struct stm32_spi_desc *spidesc, struct iio_device_data *iio_dev_data, uint16_t num_of_bytes_transfer, uint8_t start_addr)
Enables SPI DMA to move data from iio buffer to SPI TX buffer.
Definition app_config_stm32.c:177
 
int32_t stm32_spi_dma_disable(struct stm32_spi_desc *spidesc)
Disable SPI DMA which move data from iio buffer to SPI TX buffer.
Definition app_config_stm32.c:225
 
struct stm32_gpio_init_param stm32_spi_dma_tx_stop_pwm_gpio_init_params
Definition app_config_stm32.c:60
 
Configuration file of nanodac firmware example program.