precision-converters-firmware
Loading...
Searching...
No Matches
Macros | Functions | Variables
app_config_stm32.h File Reference

Header file for STM32 platform configurations. More...

#include "main.h"
#include "app_config.h"
#include "stm32_uart.h"
#include "stm32_spi.h"
#include "stm32_pwm.h"
#include "stm32_gpio.h"
#include "stm32_i2c.h"
#include "stm32_gpio_irq.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 STM32_SPI_ID   1
 
#define SPI_CSB   15
 
#define STM32_SPI_CS_PORT   0
 
#define DCLK_PIN   7
 
#define ODR_PIN   12
 
#define DOUT0_PIN   9
 
#define DOUT1_PIN   11
 
#define PDN_PIN   0
 
#define DCLK_PORT   6
 
#define ODR_PORT   3
 
#define DOUT0_PORT   6
 
#define DOUT1_PORT   0
 
#define PDN_PORT   0
 
#define APP_UART_USB_HANDLE   hUsbDeviceHS
 
#define APP_UART_USB_IRQ   OTG_HS_IRQn
 
#define APP_UART_HANDLE   huart5
 
#define UART_IRQ_ID   UART5_IRQn
 
#define UART_DEVICE_ID   5
 
#define SPI_DEVICE_ID   STM32_SPI_ID
 
#define IRQ_INT_ID   ODR_PIN
 
#define I2C_DEVICE_ID   1
 
#define PWM_ID   4
 
#define PWM_CHANNEL   1
 
#define PWM_CLK_DIVIDER   2
 
#define PWM_PRESCALER   3
 
#define PWM_HANDLE   htim4
 
#define GPIO_TRIGGER_INT_PORT   ODR_PORT
 
#define INTR_GPIO_TRIGGER_HANDLE   0
 
#define SAMPLING_RATE   (12000)
 
#define CONV_TRIGGER_PERIOD_NSEC   (((float)(1.0 / SAMPLING_RATE) * 1000000) * 1000)
 
#define CONV_TRIGGER_DUTY_CYCLE_NSEC   (CONV_TRIGGER_PERIOD_NSEC / 40)
 
#define DOUT1_IDR   (*((volatile uint32_t *)0x40020010))
 
#define ODR_IDR   (*((volatile uint32_t *)0x40020C10))
 
#define DCLK_IDR   (*((volatile uint32_t *)0x40021810))
 
#define DOUT0_IDR   (*((volatile uint32_t *)0x40021810))
 
#define DCLK_ODR   (*((volatile uint32_t *)0x40021814))
 
#define DCLK_PIN_MASK   (uint32_t)(1 << DCLK_PIN)
 
#define ODR_PIN_MASK   (uint32_t)(1 << ODR_PIN)
 
#define DOUT0_PIN_MASK   (uint32_t)(1 << DOUT0_PIN)
 
#define DOUT1_PIN_MASK   (uint32_t)(1 << DOUT1_PIN)
 
#define I2C_TIMING   0x00000E14
 

Functions

void ad7134_dma_rx_cplt (void *hsai)
 SAI DMA Receive Complete Callback function.
 
void ad7134_dma_rx_half_cplt (void *hsai)
 SAI DMA Receive Half Complete Callback function.
 
void stm32_system_init (void)
 Initialize the STM32 system peripherals.
 

Variables

struct stm32_uart_init_param stm32_uart_extra_init_params
 
struct stm32_spi_init_param stm32_spi_extra_init_params
 
struct stm32_tdm_init_param stm32_tdm_extra_init_params
 
struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
 
struct stm32_gpio_init_param stm32_pdn_extra_init_params
 
struct stm32_i2c_init_param stm32_i2c_extra_init_params
 
struct stm32_pwm_init_param stm32_pwm_extra_init_params
 
struct stm32_gpio_init_param stm32_pwm_gpio_init_params
 
struct stm32_usb_uart_init_param stm32_vcom_extra_init_params
 
struct stm32_gpio_init_param stm32_input_extra_init_params
 
struct stm32_gpio_init_param stm32_output_extra_init_params
 
UART_HandleTypeDef APP_UART_HANDLE
 
bool data_capture_operation
 
struct iio_device_data * ad7134_iio_dev_data
 

Detailed Description

Header file for STM32 platform configurations.

Copyright (c) 2021,2023-25 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

◆ APP_UART_USB_HANDLE

#define APP_UART_USB_HANDLE   hUsbDeviceHS

◆ APP_UART_USB_IRQ

#define APP_UART_USB_IRQ   OTG_HS_IRQn

◆ CONV_TRIGGER_DUTY_CYCLE_NSEC

#define CONV_TRIGGER_DUTY_CYCLE_NSEC   (CONV_TRIGGER_PERIOD_NSEC / 40)

◆ CONV_TRIGGER_PERIOD_NSEC

#define CONV_TRIGGER_PERIOD_NSEC   (((float)(1.0 / SAMPLING_RATE) * 1000000) * 1000)

◆ DCLK_IDR

#define DCLK_IDR   (*((volatile uint32_t *)0x40021810))

◆ DCLK_ODR

#define DCLK_ODR   (*((volatile uint32_t *)0x40021814))

◆ DCLK_PIN

#define DCLK_PIN   7

◆ DCLK_PIN_MASK

#define DCLK_PIN_MASK   (uint32_t)(1 << DCLK_PIN)

◆ DCLK_PORT

#define DCLK_PORT   6

◆ DOUT0_IDR

#define DOUT0_IDR   (*((volatile uint32_t *)0x40021810))

◆ DOUT0_PIN

#define DOUT0_PIN   9

◆ DOUT0_PIN_MASK

#define DOUT0_PIN_MASK   (uint32_t)(1 << DOUT0_PIN)

◆ DOUT0_PORT

#define DOUT0_PORT   6

◆ DOUT1_IDR

#define DOUT1_IDR   (*((volatile uint32_t *)0x40020010))

◆ DOUT1_PIN

#define DOUT1_PIN   11

◆ DOUT1_PIN_MASK

#define DOUT1_PIN_MASK   (uint32_t)(1 << DOUT1_PIN)

◆ DOUT1_PORT

#define DOUT1_PORT   0

◆ GPIO_TRIGGER_INT_PORT

#define GPIO_TRIGGER_INT_PORT   ODR_PORT

◆ I2C_DEVICE_ID

#define I2C_DEVICE_ID   1

◆ I2C_TIMING

#define I2C_TIMING   0x00000E14

◆ INTR_GPIO_TRIGGER_HANDLE

#define INTR_GPIO_TRIGGER_HANDLE   0

◆ IRQ_INT_ID

#define IRQ_INT_ID   ODR_PIN

◆ ODR_IDR

#define ODR_IDR   (*((volatile uint32_t *)0x40020C10))

◆ ODR_PIN

#define ODR_PIN   12

◆ ODR_PIN_MASK

#define ODR_PIN_MASK   (uint32_t)(1 << ODR_PIN)

◆ ODR_PORT

#define ODR_PORT   3

◆ PDN_PIN

#define PDN_PIN   0

◆ PDN_PORT

#define PDN_PORT   0

◆ PWM_CHANNEL

#define PWM_CHANNEL   1

◆ PWM_CLK_DIVIDER

#define PWM_CLK_DIVIDER   2

◆ PWM_HANDLE

#define PWM_HANDLE   htim4

◆ PWM_ID

#define PWM_ID   4

◆ PWM_PRESCALER

#define PWM_PRESCALER   3

◆ SAMPLING_RATE

#define SAMPLING_RATE   (12000)

◆ SPI_CSB

#define SPI_CSB   15

◆ SPI_DEVICE_ID

#define SPI_DEVICE_ID   STM32_SPI_ID

◆ STM32_SPI_CS_PORT

#define STM32_SPI_CS_PORT   0

◆ STM32_SPI_ID

#define STM32_SPI_ID   1

◆ UART_DEVICE_ID

#define UART_DEVICE_ID   5

◆ UART_IRQ_ID

#define UART_IRQ_ID   UART5_IRQn

Function Documentation

◆ ad7134_dma_rx_cplt()

void ad7134_dma_rx_cplt ( void *  hsai)

SAI DMA Receive Complete Callback function.

Parameters
hsai- pointer to a SAI Handle structure
Returns
None

◆ ad7134_dma_rx_half_cplt()

void ad7134_dma_rx_half_cplt ( void *  hsai)

SAI DMA Receive Half Complete Callback function.

Parameters
hsai- pointer to a SAI Handle
Returns
None

◆ stm32_system_init()

void stm32_system_init ( void  )

Initialize the STM32 system peripherals.

Returns
None

Variable Documentation

◆ ad7134_iio_dev_data

struct iio_device_data* ad7134_iio_dev_data
extern

◆ APP_UART_HANDLE

UART_HandleTypeDef APP_UART_HANDLE
extern

◆ data_capture_operation

bool data_capture_operation
extern

◆ stm32_i2c_extra_init_params

struct stm32_i2c_init_param stm32_i2c_extra_init_params
extern

◆ stm32_input_extra_init_params

struct stm32_gpio_init_param stm32_input_extra_init_params
extern

◆ stm32_output_extra_init_params

struct stm32_gpio_init_param stm32_output_extra_init_params
extern

◆ stm32_pdn_extra_init_params

struct stm32_gpio_init_param stm32_pdn_extra_init_params
extern

◆ stm32_pwm_extra_init_params

struct stm32_pwm_init_param stm32_pwm_extra_init_params
extern

◆ stm32_pwm_gpio_init_params

struct stm32_gpio_init_param stm32_pwm_gpio_init_params
extern

◆ stm32_spi_extra_init_params

struct stm32_spi_init_param stm32_spi_extra_init_params
extern

◆ stm32_tdm_extra_init_params

struct stm32_tdm_init_param stm32_tdm_extra_init_params
extern

◆ stm32_trigger_gpio_irq_init_params

struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
extern

◆ stm32_uart_extra_init_params

struct stm32_uart_init_param stm32_uart_extra_init_params
extern

◆ stm32_vcom_extra_init_params

struct stm32_usb_uart_init_param stm32_vcom_extra_init_params
extern