precision-converters-firmware
Macros | Functions | Variables
app_config_stm32.h File Reference

Header file for STM32 platform configurations. More...

#include <stdint.h>
#include "stm32_uart.h"
#include "stm32_spi.h"
#include "stm32_gpio.h"
#include "stm32_irq.h"
#include "stm32_pwm.h"
#include "stm32_gpio_irq.h"
#include "app_config.h"
Include dependency graph for app_config_stm32.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HW_CARRIER_NAME   SDP_K1
 
#define APP_UART_HANDLE   &huart5
 
#define UART_IRQ_ID   UART5_IRQn
 
#define RESET_PIN   11
 
#define RESET_PORT   6
 
#define LDAC_PIN   15
 
#define LDAC_PORT   1
 
#define GPIO_TRIGGER_INT_PORT   1
 
#define SPI_DMA_TX_STOP_PWM_GPIO_PIN   12
 
#define SPI_DMA_TX_STOP_PWM_GPIO_PORT   3
 
#define SPI_DEVICE_ID   1
 
#define SPI_CSB   15
 
#define STM32_SPI_CS_PORT   0
 
#define IRQ_CTRL_ID   15
 
#define TRIGGER_INT_ID   15
 
#define trigger_gpio_handle   0
 
#define LDAC_GPIO_PRIORITY   1
 
#define LDAC_PWM_ID   12
 
#define LDAC_PWM_CHANNEL   2
 
#define LDAC_PWM_CLK_DIVIDER   2
 
#define SPI_DMA_TX_STOP_PWM_ID   4
 
#define SPI_DMA_TX_STOP_PWM_PRESCALER   0
 
#define SPI_DMA_TX_STOP_PWM_CHANNEL   1
 
#define SPI_DMA_TX_STOP_PWM_CLK_DIVIDER   2
 
#define spi_extra_init_params   stm32_spi_init_params
 
#define spi_extra_init_params_without_sw_csb   stm32_spi_init_params_without_sw_csb
 
#define uart_extra_init_params   stm32_uart_init_params
 
#define ldac_pwm_extra_init_params   stm32_ldac_pwm_init_params
 
#define spi_dma_tx_stop_pwm_extra_init_params   stm32_spi_dma_tx_stop_pwm_init_params
 
#define gpio_ldac_extra_init_params   stm32_gpio_ldac_init_params
 
#define spi_dma_tx_stop_pwm_gpio_extra_init_params   stm32_spi_dma_tx_stop_pwm_gpio_init_params
 
#define gpio_reset_extra_init_params   stm32_gpio_reset_init_params
 
#define ext_int_extra_init_params   stm32_trigger_gpio_irq_init_params
 
#define irq_platform_ops   stm32_gpio_irq_ops
 
#define gpio_ops   stm32_gpio_ops
 
#define spi_ops   stm32_spi_ops
 
#define pwm_ops   stm32_pwm_ops
 
#define uart_ops   stm32_uart_ops
 
#define MAX_SAMPLING_RATE   21593
 
#define LDAC_PWM_DUTY_CYCLE   50
 
#define MAX_SPI_SCLK   22500000
 
#define LDAC_PWM_PRESCALER   3
 

Functions

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. More...
 
int32_t stm32_spi_dma_disable (struct stm32_spi_desc *spidesc)
 Disable SPI DMA which move data from iio buffer to SPI TX buffer. More...
 

Variables

struct stm32_uart_init_param stm32_uart_init_params
 
struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
 
struct stm32_spi_init_param stm32_spi_init_params
 
struct stm32_spi_init_param stm32_spi_init_params_without_sw_csb
 
struct stm32_gpio_init_param stm32_gpio_ldac_init_params
 
struct stm32_gpio_init_param stm32_spi_dma_tx_stop_pwm_gpio_init_params
 
struct stm32_gpio_init_param stm32_gpio_reset_init_params
 
struct stm32_pwm_init_param stm32_ldac_pwm_init_params
 
struct stm32_pwm_init_param stm32_spi_dma_tx_stop_pwm_init_params
 
UART_HandleTypeDef huart5
 
SPI_HandleTypeDef hspi1
 
TIM_HandleTypeDef htim4
 
uint32_t spi_dma_tx_stop_pwm_frquency [NUMBER_OF_CHANNELS]
 

Detailed Description

Header file for STM32 platform configurations.

Copyright (c) 2023-2024 Analog Devices, Inc. All rights reserved.

This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.

Macro Definition Documentation

◆ APP_UART_HANDLE

#define APP_UART_HANDLE   &huart5

◆ ext_int_extra_init_params

#define ext_int_extra_init_params   stm32_trigger_gpio_irq_init_params

◆ gpio_ldac_extra_init_params

#define gpio_ldac_extra_init_params   stm32_gpio_ldac_init_params

◆ gpio_ops

#define gpio_ops   stm32_gpio_ops

◆ gpio_reset_extra_init_params

#define gpio_reset_extra_init_params   stm32_gpio_reset_init_params

◆ GPIO_TRIGGER_INT_PORT

#define GPIO_TRIGGER_INT_PORT   1

◆ HW_CARRIER_NAME

#define HW_CARRIER_NAME   SDP_K1

◆ IRQ_CTRL_ID

#define IRQ_CTRL_ID   15

◆ irq_platform_ops

#define irq_platform_ops   stm32_gpio_irq_ops

◆ LDAC_GPIO_PRIORITY

#define LDAC_GPIO_PRIORITY   1

◆ LDAC_PIN

#define LDAC_PIN   15

◆ LDAC_PORT

#define LDAC_PORT   1

◆ LDAC_PWM_CHANNEL

#define LDAC_PWM_CHANNEL   2

◆ LDAC_PWM_CLK_DIVIDER

#define LDAC_PWM_CLK_DIVIDER   2

◆ LDAC_PWM_DUTY_CYCLE

#define LDAC_PWM_DUTY_CYCLE   50

◆ ldac_pwm_extra_init_params

#define ldac_pwm_extra_init_params   stm32_ldac_pwm_init_params

◆ LDAC_PWM_ID

#define LDAC_PWM_ID   12

◆ LDAC_PWM_PRESCALER

#define LDAC_PWM_PRESCALER   3

◆ MAX_SAMPLING_RATE

#define MAX_SAMPLING_RATE   21593

◆ MAX_SPI_SCLK

#define MAX_SPI_SCLK   22500000

◆ pwm_ops

#define pwm_ops   stm32_pwm_ops

◆ RESET_PIN

#define RESET_PIN   11

◆ RESET_PORT

#define RESET_PORT   6

◆ SPI_CSB

#define SPI_CSB   15

◆ SPI_DEVICE_ID

#define SPI_DEVICE_ID   1

◆ SPI_DMA_TX_STOP_PWM_CHANNEL

#define SPI_DMA_TX_STOP_PWM_CHANNEL   1

◆ SPI_DMA_TX_STOP_PWM_CLK_DIVIDER

#define SPI_DMA_TX_STOP_PWM_CLK_DIVIDER   2

◆ spi_dma_tx_stop_pwm_extra_init_params

#define spi_dma_tx_stop_pwm_extra_init_params   stm32_spi_dma_tx_stop_pwm_init_params

◆ spi_dma_tx_stop_pwm_gpio_extra_init_params

#define spi_dma_tx_stop_pwm_gpio_extra_init_params   stm32_spi_dma_tx_stop_pwm_gpio_init_params

◆ SPI_DMA_TX_STOP_PWM_GPIO_PIN

#define SPI_DMA_TX_STOP_PWM_GPIO_PIN   12

◆ SPI_DMA_TX_STOP_PWM_GPIO_PORT

#define SPI_DMA_TX_STOP_PWM_GPIO_PORT   3

◆ SPI_DMA_TX_STOP_PWM_ID

#define SPI_DMA_TX_STOP_PWM_ID   4

◆ SPI_DMA_TX_STOP_PWM_PRESCALER

#define SPI_DMA_TX_STOP_PWM_PRESCALER   0

◆ spi_extra_init_params

#define spi_extra_init_params   stm32_spi_init_params

◆ spi_extra_init_params_without_sw_csb

#define spi_extra_init_params_without_sw_csb   stm32_spi_init_params_without_sw_csb

◆ spi_ops

#define spi_ops   stm32_spi_ops

◆ STM32_SPI_CS_PORT

#define STM32_SPI_CS_PORT   0

◆ trigger_gpio_handle

#define trigger_gpio_handle   0

◆ TRIGGER_INT_ID

#define TRIGGER_INT_ID   15

◆ uart_extra_init_params

#define uart_extra_init_params   stm32_uart_init_params

◆ UART_IRQ_ID

#define UART_IRQ_ID   UART5_IRQn

◆ uart_ops

#define uart_ops   stm32_uart_ops

Function Documentation

◆ stm32_spi_dma_disable()

int32_t stm32_spi_dma_disable ( struct stm32_spi_desc *  spidesc)

Disable SPI DMA which move data from iio buffer to SPI TX buffer.

Parameters
desc[in]-Pointer to ad3552r device descriptor
Returns
0 in case of success, negative error code otherwise

◆ stm32_spi_dma_enable()

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.

Parameters
desc[in]-Pointer to ad3552r device descriptor
iio_dev_data[in]-Pointer to IIO device data structure
num_of_bytes_transfer[in]-number of bytes to transfer for each ldac cycle.
start_addr[in]-starting address need to be transferred in streaming mode of ad3552r
Returns
0 in case of success, negative error code otherwise

Variable Documentation

◆ hspi1

SPI_HandleTypeDef hspi1
extern

◆ htim4

TIM_HandleTypeDef htim4
extern

◆ huart5

UART_HandleTypeDef huart5
extern

◆ spi_dma_tx_stop_pwm_frquency

uint32_t spi_dma_tx_stop_pwm_frquency[NUMBER_OF_CHANNELS]

◆ stm32_gpio_ldac_init_params

struct stm32_gpio_init_param stm32_gpio_ldac_init_params
extern

◆ stm32_gpio_reset_init_params

struct stm32_gpio_init_param stm32_gpio_reset_init_params
extern

◆ stm32_ldac_pwm_init_params

struct stm32_pwm_init_param stm32_ldac_pwm_init_params
extern

◆ stm32_spi_dma_tx_stop_pwm_gpio_init_params

struct stm32_gpio_init_param stm32_spi_dma_tx_stop_pwm_gpio_init_params
extern

◆ stm32_spi_dma_tx_stop_pwm_init_params

struct stm32_pwm_init_param stm32_spi_dma_tx_stop_pwm_init_params
extern

◆ stm32_spi_init_params

struct stm32_spi_init_param stm32_spi_init_params
extern

◆ stm32_spi_init_params_without_sw_csb

struct stm32_spi_init_param stm32_spi_init_params_without_sw_csb
extern

◆ stm32_trigger_gpio_irq_init_params

struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
extern

◆ stm32_uart_init_params

struct stm32_uart_init_param stm32_uart_init_params
extern