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

Application configurations module for STM32 platform. More...

#include "app_config_stm32.h"
#include "no_os_error.h"
#include "app_config.h"
#include "ad4170_iio.h"
#include "no_os_pwm.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 ad4170_dma_rx_half_cplt (SAI_HandleTypeDef *hsai)
 SAI DMA Receive Half Complete Callback function. More...
 
void ad4170_dma_rx_cplt (SAI_HandleTypeDef *hsai)
 SAI DMA Receive Complete Callback function. More...
 
void ad4170_spi_dma_rx_cplt_callback (DMA_HandleTypeDef *hdma)
 Callback function to flag the capture of number of requested samples. More...
 
void ad4170_spi_dma_rx_half_cplt_callback (DMA_HandleTypeDef *hdma)
 Callback function to flag the capture of Half the number of requested samples. More...
 
void update_buff (uint32_t *local_buf, uint32_t *buf_start_addr)
 Update buffer index. More...
 
void tim8_config (void)
 Configure Tx Trigger timer. More...
 
void stm32_timer_stop (void)
 Disable Timer signals. More...
 
void stm32_abort_dma_transfer (void)
 Abort DMA Transfers. More...
 
void tim8_init (struct no_os_pwm_desc *pwm_desc)
 Initialize Tx trigger advanced PWM parameters. More...
 

Variables

struct stm32_spi_init_param stm32_spi_extra_init_params
 
struct stm32_uart_init_param stm32_uart_extra_init_params
 
struct stm32_gpio_init_param stm32_trigger_gpio_extra_init_params
 
struct stm32_gpio_init_param stm32_dig_aux1_gpio_extra_init_params
 
struct stm32_gpio_init_param stm32_dig_aux2_gpio_extra_init_params
 
struct stm32_gpio_init_param stm32_sync_inb_gpio_extra_init_params
 
struct stm32_gpio_irq_init_param stm32_trigger_gpio_irq_init_params
 
struct stm32_gpio_init_param stm32_csb_gpio_extra_init_params
 
struct stm32_i2c_init_param stm32_i2c_extra_init_params
 

Detailed Description

Application configurations module for STM32 platform.

Copyright (c) 2023-24 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

◆ ad4170_dma_rx_cplt()

void ad4170_dma_rx_cplt ( SAI_HandleTypeDef *  hsai)

SAI DMA Receive Complete Callback function.

Parameters
hsai- pointer to a SAI_HandleTypeDef structure
Returns
None

◆ ad4170_dma_rx_half_cplt()

void ad4170_dma_rx_half_cplt ( SAI_HandleTypeDef *  hsai)

SAI DMA Receive Half Complete Callback function.

Parameters
hsai- pointer to a SAI_HandleTypeDef structure
Returns
None

◆ ad4170_spi_dma_rx_cplt_callback()

void ad4170_spi_dma_rx_cplt_callback ( DMA_HandleTypeDef *  hdma)

Callback function to flag the capture of number of requested samples.

Parameters
hdma- DMA handler (Unused)
Returns
None

◆ ad4170_spi_dma_rx_half_cplt_callback()

void ad4170_spi_dma_rx_half_cplt_callback ( DMA_HandleTypeDef *  hdma)

Callback function to flag the capture of Half the number of requested samples.

Parameters
hdma- DMA Handler (Unused)
Returns
None

◆ HAL_RCC_GetSysClockFreq_app()

uint32_t HAL_RCC_GetSysClockFreq_app ( )

Return the peripheral frequency.

Returns
Peripheral frequency in Hz

◆ stm32_abort_dma_transfer()

void stm32_abort_dma_transfer ( void  )

Abort DMA Transfers.

Abort ongoing SPI RX DMA transfer.

Returns
None

◆ stm32_system_init()

void stm32_system_init ( void  )

Initialize the STM32 system peripherals.

Returns
None

◆ stm32_timer_stop()

void stm32_timer_stop ( void  )

Disable Timer signals.

Stops generating timer signals.

Returns
None

◆ tim8_config()

void tim8_config ( void  )

Configure Tx Trigger timer.

Returns
None

◆ tim8_init()

void tim8_init ( struct no_os_pwm_desc *  pwm_desc)

Initialize Tx trigger advanced PWM parameters.

Parameters
pwm_desc[in,out]
Returns
None

◆ update_buff()

void update_buff ( uint32_t *  local_buf,
uint32_t *  buf_start_addr 
)

Update buffer index.

Parameters
local_buf[out]- Local Buffer
buf_start_addr[out]- Buffer start addr
Returns
None

Variable Documentation

◆ stm32_csb_gpio_extra_init_params

struct stm32_gpio_init_param stm32_csb_gpio_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP,
.speed = GPIO_SPEED_FREQ_VERY_HIGH,
}

◆ stm32_dig_aux1_gpio_extra_init_params

struct stm32_gpio_init_param stm32_dig_aux1_gpio_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_INPUT,
.speed = GPIO_SPEED_FREQ_VERY_HIGH,
}

◆ stm32_dig_aux2_gpio_extra_init_params

struct stm32_gpio_init_param stm32_dig_aux2_gpio_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_INPUT,
.speed = GPIO_SPEED_FREQ_VERY_HIGH,
}

◆ 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_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_sync_inb_gpio_extra_init_params

struct stm32_gpio_init_param stm32_sync_inb_gpio_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_OUTPUT_PP,
.speed = GPIO_SPEED_FREQ_VERY_HIGH,
}

◆ stm32_trigger_gpio_extra_init_params

struct stm32_gpio_init_param stm32_trigger_gpio_extra_init_params
Initial value:
= {
.mode = GPIO_MODE_INPUT,
.speed = GPIO_SPEED_FREQ_VERY_HIGH,
}

◆ 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