QP/C++  6.5.1
DPP on STM32F4-Discovery

The DPP example for STM32F4-Discovery board is located directory examples/arm-cm/dpp_stm32f4-discovery.

bd_STM32F4-Discovery.jpg
STM32F4-Discovery board

Demonstrated built-in kernels:

  • cooperative QV with ARM-Keil, GNU-ARM, and IAR-ARM toolchains
  • preemptive, run-to-completion QK with ARM-Keil, GNU-ARM, and IAR-ARM toolchains
  • dual-mode (run-to-completion/blocking) QXK with ARM-Keil, GNU-ARM, and IAR-ARM toolchains

Features:

  • multiple active objects, including 5 instances of the same AO class (Philo)
  • extended threads (the QXK version)
  • QP/Spy software tracing using the virtual COM-port
  • bi-directional QP/Spy (sending commands to the target)

After you load the DPP example into the STM32F4-Discovery board, the application should start blinking the 4 on-board LEDs. You can press the User button (blue) to PAUSE the philosophers for as long as the button is depressed. The philosophers resume dining when you release the User button. (In the PAUSED state the Table active object stops granting permissions to eat, so eventually all philosophers end in the "hungry" state.)


QS Software Tracing

The DPP example for embOS on STM32F4-Discovery board provides the "Spy" build configuration, which outputs the QS (Quantum Spy) software tracing data through USART2. To get the data out of the board, you need to connect the TTL/RS232 converter as follows:

STM32F4-Discovery TTL/RS232 Converter
PA2 TX
PA3 RX (currently not used)
VDD VCC
GND GND
bd_STM32F4-Discovery_RS232.jpg
STM32F4-Discovery board connected to RS232 level shifter

The output is generated at 115200 baud rate.

Here is an example invocation of the QSPY host application to receive the QS data from STM32F4-Discovery:

qspy -cCOM1

The actual COM port number might be different on your Windows machine. Please check the Device Manager to find the COM port number.


Next: DPP on STM32F746G-Discovery