Nucleo Board Bsp; Joystick; Figure 6. Nucleo Bsp Architecture - ST Nucleo STM32F302R8 User Manual

Table of Contents

Advertisement

Demonstration firmware package
2.
Media: the media files (*.bmp) required to run the demonstration are available under
the FW package Utilities\Media\Images folder
3.
Inc: contains the demonstration header files
4.
Src: contains the demonstration source files
5.
Project settings: a folder per toolchain containing the project settings and the linker
files.
3.2

Nucleo board BSP

For each board, a set of Button, LED and Joystick drivers is available within the
stm32f3xx_nucleo.c/.h files, implementing the board capabilities and the bus link
mechanism.
3.2.1

Joystick

The 5-way joystick on the shield is based on a resistor trick to permit all the switches to
share one analog pin. Each movement of the joystick control connects a different resistor
and results in a different voltage reading.
The ADC peripheral is configured within the stm32f3xx_nucleo.c/.h driver in order to get
analog voltage values through the analog I/O pin 3.
The BSP_JOY_GetState() function reads the analog pin and compares the result with 5
different ranges to determine which (if any) direction the stick has been moved (left, right,
up, down, select).
10/18

Figure 6. Nucleo BSP architecture

DocID026524 Rev 2
UM1784

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Nucleo STM32F302R8 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Nucleo stm32f303reNucleo stm32f334r8

Table of Contents