STM32F0xx Standard Peripherals Firmware Library: Description of the 8 UART Communication IT example.

STM32F0xx Standard Peripherals Library

Description of the 8 UART Communication IT example.
  ******************** (C) COPYRIGHT 2014 STMicroelectronics *******************
  * @file    USART/USART_8xUsartsOneBoard/readme.txt 
  * @author  MCD Application Team
  * @version V1.4.0
  * @date    24-July-2014
  * @brief   Description of the 8 UART Communication IT example.
  ******************************************************************************
  *
  * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  * You may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
  *
  *        http://www.st.com/software_license_agreement_liberty_v2
  *
  * Unless required by applicable law or agreed to in writing, software 
  * distributed under the License is distributed on an "AS IS" BASIS, 
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *
  ******************************************************************************
   
Example Description

This example provides a small application in which 8xUsarts are used for a circular communication using interrupts and USART firmware library.

First, the USARTy sends aTxBuffer to USARTy+1. The USARTy+1 receives data and stores it into aRxBuffer[y]. Then, the received data is then compared with the sent one. Then, USARTy+1 sends the received message to the next USARTy+2. At the end, the last one USART8 sends the data to the first One USART1. It can validate the correctness of the USART1_TX sent data and USART1_RX received data. These operations can be repeated infinitely.

You can see the received data stored in aRxBuffer[] variable using your toolchain debugger.

The 8xUSARTs are configured as follow:

  • BaudRate = 9600 baud
  • Word Length = 8 Bits
  • One Stop Bit
  • No parity
  • Hardware flow control disabled (RTS and CTS signals)
  • Receive and transmit enabled
Directory contents
Note:
The "system_stm32f0xx.c" is generated by an automatic clock configuration tool and can be easily customized to meet user application requirements. To select different clock setup, use the "STM32F0xx_Clock_Configuration_VX.Y.Z.xls" provided with the AN4055 package available on ST Microcontrollers
Hardware and Software environment
  • This example runs on STM32F0xx devices.
  • This example has been tested with STMicroelectronics STM32091C-EVAL including respectively STM32F091VCT6 devices and can be easily tailored to any other supported device and development board
  • STM32091C-EVAL Set-up
    • Put jumper JP1 in position 2-3
    • Put jumpers in CN1 to connect:
      • USART1 Tx to USART2 Rx in position 1-2, or connect PA9 to PD6
      • USART2 Tx to USART3 Rx in position 3-4, or connect PD5 to PD9
      • USART3 Tx to USART4 Rx in position 5-6, or connect PD8 to PC11
      • USART4 Tx to USART5 Rx in position 7-8, or connect PC10 to PB4
      • USART5 Tx to USART6 Rx in position 9-10, or connect PB3 to PF10
      • USART6 Tx to USART7 Rx in position 11-12, or connect PF9 to PF3
      • USART7 Tx to USART8 Rx in position 13-14, or connect PF2 to PC9
      • USART8 Tx to USART1 Rx in position 15-16, or connect PC8 to PA10
How to use it ?

In order to make the program work, you must do the following :

  • Copy all source files from this example folder to the template folder under Project
  • Open your preferred toolchain
  • Rebuild all files and load your image into target memory
  • Run the example

© COPYRIGHT STMicroelectronics

STM32L1xx Standard Peripherals Library: Footer

 

 

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