onARM

STM32 Tamper example

The STM32 Tamper example program shows how to configure and use the tamper detection of STMicroelectronics STM32F103xx microcontroller.

BKP_DR1 and BKP_DR2 are set to specific values. Tamper pin is configured to generate an interrupt.
LED PB9 is lit if BKP_DR1, BKP_DR2 are cleared upon a tamper event, LED PB8 is lit if BKP_DR1, BKP_DR2 are not cleared.

The configuration of the clocks, GPIO and tamper is done using the Configuration Wizard in file STM32_Init.c.

Two µVision targets are available:

  • Simulator where the program runs in the software simulator.
  • MCBSTM32 where the program runs from internal Flash located on the microcontroller.

The example is tesed with the Keil Evaluation Board MCBSTM32.

STM32_TAMPER.ZIP (28K)
Tuesday, November 20, 2007