Information Center for ARM

Example description

  
Lib_DEBUG_Example Lib DEBUG example
  
Example Description 

This example demonstrates how to declare a dynamic peripherals pointers used for
Debug mode.  

To use Debug mode you have to add the stm32f2xx_ip_dbg.c file to your application.
This creates a pointer to the peripheral structure in SRAM. Debugging consequently
becomes easier and all register settings can be obtained by dumping a peripheral 
variable.

When the "USE_FULL_ASSERT" label is uncommented (in stm32f2xx_conf.h file),
the assert_param macro is expanded and run-time checking is enabled in the firmware
library code. The run-time checking allows checking that all the library functions
input value lies within the parameter allowed values.

The associated program simulates wrong parameter passed to library function and the
source of the error is printed on Hyperterminal (through USART).

The Debug mode increases the code size and reduces the code performance. For this
reason, it is recommended to used it only when debugging the application and to
remove it from the final application code.

Directory contents 

  - Lib_DEBUG/Lib_DEBUG_Example/stm32f2xx_conf.h    Library Configuration file
  - Lib_DEBUG/Lib_DEBUG_Example/stm32f2xx_it.c      Interrupt handlers
  - Lib_DEBUG/Lib_DEBUG_Example/stm32f2xx_it.h      Interrupt handlers header file
  - Lib_DEBUG/Lib_DEBUG_Example/main.c              Main program
  - Lib_DEBUG/Lib_DEBUG_Example/stm32f2xx_ip_dbg.c  Peripherals pointers initialization
  - Lib_DEBUG/Lib_DEBUG_Example/stm32f2xx_ip_dbg.h  Header for stm32f2xx_ip_dbg.c 
  - Lib_DEBUG/Lib_DEBUG_Example/system_stm32f2xx.c  STM32F2xx system source file
  
	  The "system_stm32f2xx.c" is generated by an automatic clock configuration 
      tool and can be easily customized to your own configuration. 
      To select different clock setup, use the "STM32F2xx_Clock_Configuration_V1.0.0.xls" tool.

Hardware and Software environment

  - This example runs on STM32F2xx Devices.
  
  - This example has been tested with STM322xG-EVAL RevB and can be easily tailored
    to any other development board

  - STM322xG-EVAL Set-up
    - Connect a null-modem female/female RS232 cable between the DB9 connector 
      CN16 and PC serial port.
    - Make sure that JP22 is in position 1<->2
 
  - Hyperterminal configuration:
    - Word Length = 8 Bits
    - One Stop Bit
    - No parity
    - BaudRate = 115200 baud
    - flow control: None