STM32F0xx Standard Peripherals Firmware Library: USART_8xUsartsOneBoard

STM32F0xx Standard Peripherals Library

STM32F0xx Standard Peripherals Firmware Library

Functions

static uint16_t Buffercmp (uint8_t *pBuffer1, uint8_t *pBuffer2, uint16_t BufferLength)
 Compares two buffers.
static void Delay (__IO uint32_t nTime)
 Inserts a delay time.
static void GPIO_Configuration (void)
 Configures the different GPIO ports.
void HardFault_Handler (void)
 This function handles Hard Fault exception.
int main (void)
 Main program.
void NMI_Handler (void)
 This function handles NMI exception.
static void NVIC_Configuration (void)
 Configures the nested vectored interrupt controller.
void PendSV_Handler (void)
 This function handles PendSVC exception.
static void RCC_Configuration (void)
 Configures the different system clocks.
void SVC_Handler (void)
 This function handles SVCall exception.
void SysTick_Handler (void)
 This function handles SysTick Handler.
void TimingDelay_Decrement (void)
 Decrements the TimingDelay variable.
void USART1_IRQHandler (void)
 This function handles USARTy global interrupt request.
void USART2_IRQHandler (void)
 This function handles USARTy global interrupt request.
void USART3_8_IRQHandler (void)
 This function handles USARTy global interrupt request.

Variables

uint8_t aRxBuffer [8][BUFFER_SIZE]
uint8_t aRxBuffer [USART_MAX_INDEX][BUFFER_SIZE]
uint8_t aTxBuffer [BUFFER_SIZE] = "USART Example: 8xUsarts Tx/Rx Communication"
__IO uint8_t ReceiveState = 0
__IO uint8_t ReceiveState
__IO uint8_t RxCounter = 0
static __IO uint32_t TimingDelay
__IO uint8_t TxCounter = 0
USART_InitTypeDef USART_InitStructure
uint8_t UsartIndex = 0
USART_TypeDef * UsartInstance [USART_MAX_INDEX] = {USART1, USART2, USART3, USART4, USART5, USART6, USART7, USART8}

Function Documentation

static uint16_t Buffercmp ( uint8_t *  pBuffer1,
uint8_t *  pBuffer2,
uint16_t  BufferLength 
) [static]

Compares two buffers.

Parameters:
pBuffer1,pBuffer2,:buffers to be compared.
BufferLength,:buffer's length
Return values:
0: pBuffer1 identical to pBuffer2 >0 : pBuffer1 differs from pBuffer2

Definition at line 370 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/main.c.

Referenced by main().

static void Delay ( __IO uint32_t  nTime) [static]

Inserts a delay time.

Parameters:
nTime,:specifies the delay time length, in milliseconds.
Return values:
None
static void GPIO_Configuration ( void  ) [static]

Configures the different GPIO ports.

Parameters:
None
Return values:
None

Definition at line 214 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/main.c.

References GPIO_InitStructure.

Referenced by main().

void HardFault_Handler ( void  )

This function handles Hard Fault exception.

Parameters:
None
Return values:
None

Definition at line 68 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/stm32f0xx_it.c.

int main ( void  )

Main program.

Parameters:
None
Return values:
None

< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_stm32f0xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f0xx.c file

Definition at line 68 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/main.c.

References aRxBuffer, aTxBuffer, BUFFER_SIZE, Buffercmp(), Delay(), GPIO_Configuration(), NVIC_Configuration(), RCC_Configuration(), ReceiveState, SystemCoreClock, TxCounter, USART_InitStructure, USART_MAX_INDEX, UsartIndex, and UsartInstance.

void NMI_Handler ( void  )

This function handles NMI exception.

Parameters:
None
Return values:
None

Definition at line 59 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/stm32f0xx_it.c.

static void NVIC_Configuration ( void  ) [static]

Configures the nested vectored interrupt controller.

Parameters:
None
Return values:
None

Definition at line 328 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/main.c.

References NVIC_InitStructure.

Referenced by main().

void PendSV_Handler ( void  )

This function handles PendSVC exception.

Parameters:
None
Return values:
None

Definition at line 90 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/stm32f0xx_it.c.

static void RCC_Configuration ( void  ) [static]

Configures the different system clocks.

Parameters:
None
Return values:
None

Definition at line 198 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/main.c.

Referenced by main().

void SVC_Handler ( void  )

This function handles SVCall exception.

Parameters:
None
Return values:
None

Definition at line 81 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/stm32f0xx_it.c.

void SysTick_Handler ( void  )

This function handles SysTick Handler.

Parameters:
None
Return values:
None

Definition at line 99 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/stm32f0xx_it.c.

References TimingDelay_Decrement().

void TimingDelay_Decrement ( void  )

Decrements the TimingDelay variable.

Parameters:
None
Return values:
None

Definition at line 185 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/main.c.

References TimingDelay.

void USART1_IRQHandler ( void  )

This function handles USARTy global interrupt request.

Parameters:
None
Return values:
None

Definition at line 115 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/stm32f0xx_it.c.

References aRxBuffer, BUFFER_SIZE, ReceiveState, and RxCounter.

void USART2_IRQHandler ( void  )

This function handles USARTy global interrupt request.

This function handles PPP interrupt request.

Parameters:
None
Return values:
None
Parameters:
None
Return values:
NoneThis function handles USART1 global interrupt request.
Parameters:
None
Return values:
None

Definition at line 135 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/stm32f0xx_it.c.

void USART3_8_IRQHandler ( void  )

This function handles USARTy global interrupt request.

Parameters:
None
Return values:
None

Definition at line 155 of file STM32F0xx_StdPeriph_Examples/USART/USART_8xUsartsOneBoard/stm32f0xx_it.c.

References aRxBuffer, BUFFER_SIZE, ReceiveState, and RxCounter.


Variable Documentation

uint8_t aRxBuffer[USART_MAX_INDEX][BUFFER_SIZE]
uint8_t aTxBuffer[BUFFER_SIZE] = "USART Example: 8xUsarts Tx/Rx Communication"
__IO uint32_t TimingDelay [static]
__IO uint8_t TxCounter = 0
uint8_t UsartIndex = 0
USART_TypeDef* UsartInstance[USART_MAX_INDEX] = {USART1, USART2, USART3, USART4, USART5, USART6, USART7, USART8}
STM32L1xx Standard Peripherals Library: Footer

 

 

 For complete documentation on STM32 Microcontrollers visit www.st.com/STM32