Added ioctls and functions for watchdogs 2 & 3. Modifed wdog1 functions. Needs testing. Fixed issues with started variable. Change to add only 3 ioctls, a config for each watchdog. Created cfg structures for watchdog1 and watchdog23. Added code to set difsel register. stop conversions before changing watchdog configs. Other logic changes. Define AN_STM32H5_FIRST and AN_STM32H5_NCMDS in nuttx/analog/ioctl.h Remove hardcoded AN_STM32H5_FIRST. Style fixes. Fix thershold for watchdog1 Got working watchdog driver with queue and signal. Needs polish. Refined isr for watchdogs. Added value back to event. value is more accurate, but not guaranteed. It accomdates dma. Used stm32_adc_sigcfg_s structure inside stm32_adc_sig_s structure. Used common naming for ioctls. Added stopifstarted and startifstopped for setting watchdogs and other bits. Added adc_reset_dma, which must be run after stopping conversions in circular mode, because buffer and conversions become misaligned. Other refinements. Added guard around adc_reset_dma, added comment blocks to new functions NuttX style fixes. Add return value to wdog configure functions. Correct number of stm32h5 adc ioctls. Minor style fix. Reduce watchdog commit to fit NuttX standards. Remove Queue and Signal aspects. Added Kconfig to initialize watchdog. Signed-off-by: kywwilson11 <kwilson@2g-eng.com> Added guard around code referencing priv->circular. Added adc_watchdog config for testing watchdog1 with adc1. Added documentation about adc_watchdog config. Adjusted documentation for adc_watchdog config. Added detailed test procedure. Longer underline under adc_watchdog title. Add code for differential adc calibration. Need to calibrate both single-ended and differential if a given adc has both single-ended and differential channels. Fixed typo. Initialize watchdog1 parameters at compile time when configured. Added comments to new elements in stm32_dev_s. Confirmed style is good. Add proper guards around ADC WDG1 variables and functions. Implemented feedback per raiden00. 1. Changed to use old chanlist type uint8_t. 2. Added smpr1, smpr2, and difsel variables to stm32_dev_s structure. 2. smpr1 and smpr2 are initialized to board defined values if BOARD_ADCx_SMPRx is defined, otherwise initialized to default. 3. difsel initialized to BOARD_ADCx_DIFSEL if defined, otherwise use default (0) for all single-ended.
172 lines
5.3 KiB
ReStructuredText
172 lines
5.3 KiB
ReStructuredText
================
|
|
ST Nucleo-H563ZI
|
|
================
|
|
|
|
.. tags:: chip:stm32, chip:stm32h5, chip:stm32h563
|
|
|
|
.. figure:: nucleo-h563zi.png
|
|
:align: center
|
|
|
|
Board Information
|
|
=================
|
|
|
|
This page discusses issues unique to NuttX configurations for the
|
|
STMicro NUCLEO-H563ZI development board featuring the STM32H563ZI
|
|
MCU. The STM32H563ZI is a 250MHz Cortex-M33 operation with 2MBytes Flash
|
|
memory and 640KByte SRAM. The board features:
|
|
|
|
- On-board ST-LINK-V3EC for programming and debugging
|
|
- 3 user LEDs
|
|
- Two pushbuttons (user and reset)
|
|
- 32.768 kHz crystal oscillator
|
|
- USB Type-C connectors
|
|
- Ethernet connector compliant with IEEE-802.3-2002
|
|
- Board connectors:
|
|
- 2x USB-C
|
|
- Ethernet RJ45
|
|
- ST Zio connector including Arduino Uno V3
|
|
- ST morpho
|
|
|
|
Refer to the http://www.st.com website for further information about this
|
|
board (search keyword: NUCLEO-H563ZI)
|
|
|
|
Serial Console
|
|
==============
|
|
|
|
Many options are available for a serial console via the Morpho connector.
|
|
Here two common serial console options are suggested:
|
|
|
|
|
|
1. Nucleo Virtual Console.
|
|
|
|
The virtual console uses Serial Port 3 (USART3) with TX on PD8 and RX on
|
|
PD9.
|
|
|
|
================= ===
|
|
VCOM Signal Pin
|
|
================= ===
|
|
SERIAL_RX PD9
|
|
SERIAL_TX PD8
|
|
================= ===
|
|
|
|
These signals are internally connected to the on board ST-Link.
|
|
|
|
The Nucleo virtual console is the default serial console in all
|
|
configurations unless otherwise stated in the description of the
|
|
configuration.
|
|
|
|
2. Arduino Serial Shield.
|
|
|
|
If you are using a standard Arduino RS-232 shield with the serial
|
|
interface with RX on pin D0 and TX on pin D1 from LPUART1:
|
|
|
|
======== ========== =====
|
|
ARDUINO FUNCTION GPIO
|
|
======== ========== =====
|
|
DO RX LPUART1_RX PB7
|
|
D1 TX LPUART1_TX PB6
|
|
======== ========== =====
|
|
|
|
Configurations
|
|
==============
|
|
|
|
Information Common to All Configurations
|
|
----------------------------------------
|
|
|
|
Each Nucleo-H563ZI configuration is maintained in a sub-directory and
|
|
can be selected as follows::
|
|
|
|
tools/configure.sh [options] nucleo-h563zi:<subdir>
|
|
|
|
Where options should specify the host build platform (-l for Linux, -c for
|
|
Cygwin under Windows, etc.). Try 'tools/configure.sh -h' for the complete
|
|
list of options.
|
|
|
|
Before starting the build, make sure that (1) your PATH environment variable
|
|
includes the correct path to your toolchain, and (2) you have the correct
|
|
toolchain selected in the configuration.
|
|
|
|
And then build NuttX by simply typing the following. At the conclusion of
|
|
the make, the nuttx binary will reside in an ELF file called, simply, nuttx.::
|
|
|
|
make
|
|
|
|
The <subdir> that is provided above as an argument to the tools/configure.sh
|
|
must be is one of the following.
|
|
|
|
NOTES:
|
|
|
|
1. These configurations use the mconf-based configuration tool. To
|
|
change any of these configurations using that tool, you should:
|
|
|
|
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
|
see additional README.txt files in the NuttX tools repository.
|
|
|
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
|
reconfiguration process.
|
|
|
|
2. Unless stated otherwise, all configurations generate console
|
|
output on the ST-Link VCOM, USART3.
|
|
|
|
3. Unless otherwise stated, the configurations are setup for Linux by
|
|
default:
|
|
|
|
Build Setup::
|
|
|
|
CONFIG_HOST_LINUX=y : Linux host operating system
|
|
|
|
4. All of these configurations use the general arm-none-eabi toolchain for
|
|
Linux That toolchain selection can easily be reconfigured using 'make
|
|
menuconfig'.
|
|
|
|
5. These configurations all assume that you are loading code using
|
|
something like the ST-Link v3 JTAG. None of these configurations are
|
|
setup to use the DFU bootloader but should be easily reconfigured to
|
|
use that bootloader if so desired.
|
|
|
|
Configuration Sub-directories
|
|
=============================
|
|
|
|
nsh:
|
|
----
|
|
|
|
This configuration provides a basic NuttShell configuration (NSH)
|
|
for the Nucleo-H563ZI. The default console is the VCOM on USART3.
|
|
|
|
adc:
|
|
--------
|
|
|
|
This configuration configures ADC1_IN3 and ADC1_IN10, which can be
|
|
accessed at the CN9 A0 and A1 pins respectively. Modify
|
|
nucleo-h563zi/src/stm32_adc.c to enable more channels.
|
|
|
|
adc_watchdog:
|
|
--------------
|
|
|
|
Test Procedure:
|
|
|
|
1. Build and flash NuttX with the above Kconfig. Register /dev/adc0 via the board init.
|
|
2. Start continuous conversions (DMA circular enabled) and run the adc example to sanity-check normal operation.
|
|
3. Tie both CH3 and CH10 to GND → verified no AWD interrupts and ADC continues normally.
|
|
4. Tie either CH3 or CH10 to 3.3 V with AWD1 set to “all channels” → ISR fires as expected; conversions continue; AWD1 IRQ is disabled by the ISR.
|
|
5. Switch to single-channel AWD1.
|
|
6. Select CH3: drive CH3 above the window → ISR fires; drive CH10 above the window → no ISR.
|
|
7. Select CH10: mirror the above.
|
|
8. Re-enable the watchdog interrupt using the driver IOCTL; confirm subsequent out-of-window events retrigger the ISR.
|
|
|
|
usbnsh:
|
|
--------
|
|
|
|
This configuration provides a basic NuttShell through the USB User interface.
|
|
|
|
dts:
|
|
--------
|
|
|
|
This configuration configures the digital temperature sensor (DTS)
|
|
at /dev/uorb/sensor_temp0 and provides the test application
|
|
sensortest. E.g. sensortest -n 10 temp0
|
|
|
|
References
|
|
===========
|
|
|
|
[UM3115] - STM32H5 Nucleo-144 board (MB1404)
|