boards/96boards/argonkey/doc/index.rst
.. zephyr:board:: 96b_argonkey
96Boards Argonkey #################
Overview
96Boards Argonkey board is based on the ST Microelectronics STM32F412CG Cortex M4 CPU.
This board acts as a sensor hub platform for all 96Boards compliant family products. It can also be used as a standalone board.
.. figure:: img/96b_argonkey.jpg :align: center :alt: 96Boards Argonkey
96Boards Argonkey
Hardware
96Boards Argonkey provides the following hardware components:
STM32F412CG in UFQFPN48 package
ARM® 32-bit Cortex®-M4 CPU with FPU
100 MHz max CPU frequency
1.8V work voltage
1024 KB Flash
256 KB SRAM
On board sensors:
2 User LEDs
16 General purpose LEDs
GPIO with external interrupt capability
UART
I2C (3)
SPI (1)
I2S (1)
.. zephyr:board-supported-hw::
96Boards Argonkey 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 clock runs at 84MHz, while APB1/APB2 clock runs at 42MHz.
On 96Boards Argonkey, Zephyr console output is assigned to USART1. Default settings are 115200 8N1.
96Boards Argonkey board has up to 3 I2Cs. The default I2C mapping is:
I2C3 goes to the P2 connector and can be used to attach external sensors. It goes to 100Kbit maximum.
96Boards Argonkey board has 2 SPIs. SPI1 is used in slave mode as the communication bus with the AP. SPI2 is used in master mode to control the LSM6DSL sensor. The default SPI 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_argonkey :goals: build
96Boards Argonkey can be flashed by two methods, one using the ROM bootloader and another using the SWD debug port (which requires additional hardware).
Flashing using the ROM bootloader requires a special activation pattern,
which can be triggered by using the BOOT0 pin. The ROM bootloader supports
flashing via USB (DFU), UART, I2C and SPI, but this document describes the
UART case only. You can read more about how to enable and use the ROM
bootloader by checking the application note AN2606_ .
Hereafter the documents describes basic steps to perform ArgonKey firmware flashing on a Linux PC using UART as communication channel.
Connect ArgonKey UART to your Linux PC using, for example, a USB-TTL serial
cable. The flashing procedure has been tested using a TTL-232RG_ cable with
FTDI chip. The UART pins on ArgonKey can be found on the P3 low speed
expansion connector on the back of the board.
When the USB cable is inserted to the Linux PC the following device will be created: /dev/ttyUSBx (x is usually '0').
Force STM32F412CG to enter in Bootloader mode
Use stm32flash utility to flash the ArgonKey:
.. code-block:: console
$ stm32flash -w zephyr.bin -v -g 0x08000000 /dev/ttyUSB0
See References section for more info on stm32flash_.
Select a commercial JTAG/SWD h/w tool and connect it to ArgonKey P4 connector.
The ArgonKey has been tested using the ST-LINK/V2_ tool. Once that the tool
is connected to the PC through USB, it presents itself as a USB composite
device with mass storage capability. The device can be then mounted in linux
and the f/w can be actually copied there and will be automatically flashed by
the ST-LINK onto the ArgonKey.
Example:
.. code-block:: console
$ mount /dev/sdb /mnt $ cp zephyr.bin /mnt $ umount /mnt
References
.. target-notes::
.. _AN2606: https://www.st.com/resource/en/application_note/cd00167594.pdf
.. _stm32flash: https://sourceforge.net/p/stm32flash/wiki/Home/
.. _ST-LINK/V2: https://www.st.com/en/development-tools/st-link-v2.html
.. _TTL-232RG: http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232RG_CABLES.pdf