boards/96boards/stm32_sensor_mez/doc/index.rst
.. zephyr:board:: 96b_stm32_sensor_mez
96Boards STM32 Sensor Mezzanine ###############################
Overview
96Boards STM32 Sensor Mezzanine is based on the ST Microelectronics STM32F446VE Cortex M4 CPU.
This board acts as a mezzanine platform for all 96Boards CE compliant boards. It can also be used as a standalone board.
.. figure:: img/96b_stm32_sensor_mez.jpg :align: center :alt: 96Boards STM32 Sensor Mezzanine
96Boards STM32 Sensor Mezzanine
Hardware
96Boards STM32 Sensor Mezzanine provides the following hardware components:
STM32F446VE in LQFP100 package
ARM® 32-bit Cortex®-M4 CPU with FPU
180 MHz max CPU frequency
1.8V work voltage
512 KB Flash
128 KB SRAM
On board sensors:
3User LEDs
GPIO with external interrupt capability
UART
I2C (2)
SPI (3)
I2S (1)
.. zephyr:board-supported-hw::
96Boards STM32 Sensor Mezzanine can be driven by an internal oscillator as well as the main PLL clock. In default board configuration, the 16MHz external oscillator is used to drive the main PLL clock to generate a System Clock (SYSCLK) at 84MHz. On the bus side, AHB/APB2 clocks runs at 84MHz, while APB1 clock runs at 42MHz.
On 96Boards STM32 Sensor Mezzanine, Zephyr console output is assigned to UART4 exposed via on-board Micro USB connector. Default settings are 115200 8N1.
The default USART mappings for the remaining ones are:
USART1: Connected to AP via UART0 on the 96Boards Low-Speed Header.
USART2: Connected to D0(RX) and D1(TX) on the Arduino Header.
USART3: Broken out to Grove connector J10.
96Boards STM32 Sensor Mezzanine board has up to 3 I2Cs. The default I2C mapping is:
I2C2 goes to the Groove connectors and can be used to attach external sensors.
96Boards STM32 Sensor Mezzanine board has 3 SPIs. SPI1 is used in slave mode as the communication bus with the AP. SPI2 is used in master mode to control the LSM6DS3H sensor. SPI4 is broken out to Grove Connector J5. The default SPI mapping is:
96Boards STM32 Sensor Mezzanine board exposes 6 PWM channels on the Arduino connector. The default PWM mapping is:
96Boards STM32 Sensor Mezzanine board exposes 1 I2S port which is connected to the on-board ST MP34DT01 DMIC. The default I2S mapping is:
Programming and Debugging
Here is an example for building the :zephyr:code-sample:hello_world application.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: 96b_stm32_sensor_mez :goals: build
96Boards STM32 Sensor Mezzanine board includes an ST-LINK/V2-1 embedded debug tool interface. This interface is supported by the openocd version included in the Zephyr SDK.
Here is an example for the :zephyr:code-sample:hello_world application.
Run a serial host program to connect with your 96Boards STM32 Sensor Mezzanine board.
.. code-block:: console
$ minicom -b 115200 -D /dev/ttyACM0
Build and flash the application:
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: 96b_stm32_sensor_mez :goals: build flash
You should see the following message on the console:
.. code-block:: console
$ Hello World! 96b_stm32_sensor_mez
You can debug an application in the usual way. Here is an example for the
:zephyr:code-sample:hello_world application.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: 96b_stm32_sensor_mez :maybe-skip-config: :goals: debug
References
.. target-notes::
.. _96Boards STM32 Sensor Mezzanine website: https://www.96boards.org/documentation/mezzanine/stm32/
.. _STM32F446VE on www.st.com: https://www.st.com/en/microcontrollers/stm32f446ve.html
.. _STM32F446 reference manual: https://www.st.com/resource/en/reference_manual/dm00135183.pdf