precision-converters-firmware
Functions | Variables
app_config_stm32.c File Reference

Source file for STM32 platform configurations. More...

#include "app_config_stm32.h"
#include "stm32_gpio.h"
#include "no_os_error.h"
#include "stm32_tdm_support.h"
#include "app_config.h"
Include dependency graph for app_config_stm32.c:

Functions

uint32_t HAL_RCC_GetSysClockFreq_app ()
 Return the peripheral frequency. More...
 
void stm32_system_init (void)
 Initialize the STM32 system peripherals. More...
 
void ad777x_configure_intr_priority (void)
 Prioritizes the LPUART1 interrupt over the other peripheral interrupts. More...
 
void ad777x_dma_rx_half_cplt (SAI_HandleTypeDef *hsai)
 SAI DMA Receive Half Complete Callback function. More...
 
void ad777x_dma_rx_cplt (SAI_HandleTypeDef *hsai)
 SAI DMA Receive Complete Callback function. More...
 

Variables

struct stm32_uart_init_param stm32_uart_extra_init_params
 
struct stm32_spi_init_param stm32_spi_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_reset_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_mode0_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_mode1_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_mode2_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_mode3_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_dclk0_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_dclk1_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_dclk2_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_sync_in_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_convst_sar_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_drdy_extra_init_params
 
struct stm32_gpio_init_param stm32_gpio_error_extra_init_params
 
struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
 
struct stm32_tdm_init_param stm32_tdm_extra_init_params
 
struct stm32_pwm_init_param stm32_pwm_extra_init_params
 
struct stm32_i2c_init_param stm32_i2c_extra_init_params
 

Detailed Description

Source file for STM32 platform configurations.

Copyright (c) 2022-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.

Function Documentation

◆ ad777x_configure_intr_priority()

void ad777x_configure_intr_priority ( void  )

Prioritizes the LPUART1 interrupt over the other peripheral interrupts.

Configure the interrupt priorities.

Returns
None

◆ ad777x_dma_rx_cplt()

void ad777x_dma_rx_cplt ( SAI_HandleTypeDef *  hsai)

SAI DMA Receive Complete Callback function.

Parameters
hsai- pointer to a SAI_HandleTypeDef structure
Returns
None

◆ ad777x_dma_rx_half_cplt()

void ad777x_dma_rx_half_cplt ( SAI_HandleTypeDef *  hsai)

SAI DMA Receive Half Complete Callback function.

Parameters
hsai- pointer to a SAI_HandleTypeDef structure
Returns
None

◆ HAL_RCC_GetSysClockFreq_app()

uint32_t HAL_RCC_GetSysClockFreq_app ( )

Return the peripheral frequency.

Returns
Peripheral frequency in Hz

◆ stm32_system_init()

void stm32_system_init ( void  )

Initialize the STM32 system peripherals.

Returns
None

Variable Documentation

◆ stm32_gpio_convst_sar_extra_init_params

struct stm32_gpio_init_param stm32_gpio_convst_sar_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP
}

◆ stm32_gpio_dclk0_extra_init_params

struct stm32_gpio_init_param stm32_gpio_dclk0_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP
}

◆ stm32_gpio_dclk1_extra_init_params

struct stm32_gpio_init_param stm32_gpio_dclk1_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP
}

◆ stm32_gpio_dclk2_extra_init_params

struct stm32_gpio_init_param stm32_gpio_dclk2_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP
}

◆ stm32_gpio_drdy_extra_init_params

struct stm32_gpio_init_param stm32_gpio_drdy_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_INPUT
}

◆ stm32_gpio_error_extra_init_params

struct stm32_gpio_init_param stm32_gpio_error_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_OD
}

◆ stm32_gpio_mode0_extra_init_params

struct stm32_gpio_init_param stm32_gpio_mode0_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_OD
}

◆ stm32_gpio_mode1_extra_init_params

struct stm32_gpio_init_param stm32_gpio_mode1_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP
}

◆ stm32_gpio_mode2_extra_init_params

struct stm32_gpio_init_param stm32_gpio_mode2_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP
}

◆ stm32_gpio_mode3_extra_init_params

struct stm32_gpio_init_param stm32_gpio_mode3_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP
}

◆ stm32_gpio_reset_extra_init_params

struct stm32_gpio_init_param stm32_gpio_reset_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP
}

◆ stm32_gpio_sync_in_extra_init_params

struct stm32_gpio_init_param stm32_gpio_sync_in_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP
}

◆ stm32_i2c_extra_init_params

struct stm32_i2c_init_param stm32_i2c_extra_init_params
Initial value:
= {
.i2c_timing = I2C_TIMING
}
#define I2C_TIMING
Definition: app_config_stm32.h:116

◆ stm32_pwm_extra_init_params

struct stm32_pwm_init_param stm32_pwm_extra_init_params
Initial value:
= {
.prescaler = MCLK_PWM_PRESCALER,
.timer_autoreload = true,
.mode = TIM_OC_PWM1,
.timer_chn = MCLK_PWM_CHANNEL,
.get_timer_clock = HAL_RCC_GetPCLK2Freq,
.clock_divider = MCLK_PWM_CLK_DIVIDER
}
#define MCLK_PWM_CHANNEL
Definition: app_config_stm32.h:86
#define MCLK_PWM_CLK_DIVIDER
Definition: app_config_stm32.h:87
#define MCLK_PWM_PRESCALER
Definition: app_config_stm32.h:85

◆ stm32_spi_extra_init_params

struct stm32_spi_init_param stm32_spi_extra_init_params
Initial value:
= {
.chip_select_port = STM32_SPI_CS_PORT,
.get_input_clock = HAL_RCC_GetSysClockFreq_app
}
#define STM32_SPI_CS_PORT
Definition: app_config_stm32.h:54
uint32_t HAL_RCC_GetSysClockFreq_app()
Return the peripheral frequency.
Definition: app_config_stm32.c:38

◆ stm32_tdm_extra_init_params

struct stm32_tdm_init_param stm32_tdm_extra_init_params
Initial value:
= {
.base = SAI_BASE
}
#define SAI_BASE
Definition: app_config_stm32.h:74

◆ stm32_trigger_gpio_irq_init_params

struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
Initial value:
= {
}
#define GPIO_TRIGGER_INT_PORT
Definition: app_config_stm32.h:47

◆ stm32_uart_extra_init_params

struct stm32_uart_init_param stm32_uart_extra_init_params
Initial value:
= {
.huart = APP_UART_HANDLE
}
#define APP_UART_HANDLE
Definition: app_config_stm32.h:39