STM32CubeF4/Projects/STM32F429ZI-Nucleo/Examples/UART/UART_Printf
Rania JMAI 83778d5c95 Release v1.28.1 2024-06-20 10:53:03 +01:00
..
EWARM Release v1.27.0 2022-03-09 10:37:11 +01:00
Inc Release v1.28.0 2023-11-22 15:17:09 +01:00
MDK-ARM Release v1.27.0 2022-03-09 10:37:11 +01:00
STM32CubeIDE Release v1.28.1 2024-06-20 10:53:03 +01:00
Src Release v1.27.0 2022-03-09 10:37:11 +01:00
readme.txt Release v1.27.0 2022-03-09 10:37:11 +01:00

readme.txt

/**
  @page UART_Printf UART Printf example
  
  @verbatim
  ******************** (C) COPYRIGHT 2017 STMicroelectronics *******************
  * @file    UART/UART_Printf/readme.txt 
  * @author  MCD Application Team
  * @brief   Description of the UART Printf example.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2017 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
   @endverbatim

@par Example Description 

This example shows how to re-route the C library printf function to the UART.
The UART outputs a message on the HyperTerminal.

- configuration 1: 
  connect the NUCLEO-F429ZI Rev.B board to the Hyperterminal through RS232 cable. Connect the 
  RX pin of the Hyperterminal to the Tx pin of the NUCLEO-F429ZI board (pin PD.08)( pin 10 in 
  the morpho connector CN12) and connect the Tx pin of the Hyperterminal to the Rx pin of the 
  NUCLEO-F429ZI Rev.B board (pin PD.09)( pin 69 in the morpho connector CN11).
  
Board: NUCLEO-F429ZI  Rev B   
Tx Pin: PD.08
Rx Pin: PD.09
   _________________________ 
  |           ______________|                       _______________
  |          |USART         |                      | HyperTerminal |
  |          |              |                      |               |
  |          |           TX |______________________|RX             |
  |          |              |                      |               |
  |          |              |     RS232 Cable      |               |             
  |          |              |                      |               |
  |          |           RX |______________________|TX             |          
  |          |              |                      |               |           
  |          |______________|                      |_______________|          
  |                         |                       
  |                         |                    
  |                         |                      
  |                         |                      
  |_STM32_Board_____________|               
  
- Configuration 2: 

  Connect USB cable to Host and connect UART TX pin to UART RX pin on the NUCLEO-F429ZI Rev.B board
  (Loopback mode). In this case, you can open one terminal (relative to USB com port or UART com port)
  and all data sent from this terminal will be received by the same terminal in loopback mode.
  This mode is useful for test and performance measurements.       

LED2 is ON when there is an error occurrence.

The USART is configured as follows:
    - BaudRate = 9600 baud  
    - Word Length = 8 Bits (7 data bit + 1 parity bit)
    - One Stop Bit
    - Odd parity
    - Hardware flow control disabled (RTS and CTS signals)
    - Reception and transmission are enabled in the time

@note USARTx/UARTx instance used and associated resources can be updated in "main.h"
file depending hardware configuration used.

@note When the parity is enabled, the computed parity is inserted at the MSB
position of the transmitted data.

@note Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds)
      based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from
      a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower)
      than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
      To change the SysTick interrupt priority you have to use HAL_NVIC_SetPriority() function.
      
@note The application needs to ensure that the SysTick time base is always set to 1 millisecond
      to have correct HAL operation.

@par Keywords

Connectivity, UART, Printf, Baud rate, RS-232, HyperTerminal, full-duplex

@par Directory contents 

  - UART/UART_Printf/Inc/stm32f4xx_hal_conf.h    HAL configuration file
  - UART/UART_Printf/Inc/stm32f4xx_it.h          IT interrupt handlers header file
  - UART/UART_Printf/Inc/main.h                  Header for main.c module  
  - UART/UART_Printf/Src/stm32f4xx_it.c          Interrupt handlers
  - UART/UART_Printf/Src/main.c                  Main program
  - UART/UART_Printf/Src/stm32f4xx_hal_msp.c     HAL MSP module
  - UART/UART_Printf/Src/system_stm32f4xx.c      STM32F4xx system source file


@par Hardware and Software environment

  - This example runs on STM32F429ZI devices.
    
  - This example has been tested with NUCLEO-F429ZI  Rev B board and can be
    easily tailored to any other supported device and development board.    

  - NUCLEO-F429ZI  Rev B Set-up
    - Connect ST-Link cable to the PC USB port to display data on the HyperTerminal. 
      A virtual COM port will then appear in the HyperTerminal. 


  - Hyperterminal configuration:
    - Data Length = 7 Bits
    - One Stop Bit
    - Odd parity
    - BaudRate = 9600 baud
    - Flow control: None 

@par How to use it ? 

In order to make the program work, you must do the following :
 - Open your preferred toolchain 
 - Rebuild all files and load your image into target memory
 - Run the example



 */