Skip to content

Commit

Permalink
projects:ad4170_iio: Added SPI DMA implementation
Browse files Browse the repository at this point in the history
1) Added SPI DMA implementation for AD4170 with the SDP-K1 in STM32 platform

2) Added a AD4170_MAX_SPI_SPEED macro for the SPI frequency

3) Updated copyright years

4) Moved .ioc and the extsettings to a new folder within STM32/* target *

5) Added STM32 specific files for SDP-K1 as well

6) Re-named SPI_MODE to SPI_INTERRUPT_MODE as there are two implementations with SPI now

Signed-off-by: Janani Sunil <[email protected]>
  • Loading branch information
jansunil committed Jun 18, 2024
1 parent aef4721 commit 889d292
Show file tree
Hide file tree
Showing 22 changed files with 1,233 additions and 144 deletions.
37 changes: 26 additions & 11 deletions projects/ad4170_iio/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,33 @@ Code*
*.vgdbproj
*.TMP
*.user
STM32/.settings
STM32/Core
STM32/Drivers
STM32/Debug
STM32/.cproject
STM32/.project
STM32/.mxproject
STM32/ad4170_iio Debug.launch
STM32/STM32H563ZITX_FLASH.ld
STM32/STM32H563ZITX_RAM.ld
STM32/nucleo_h563/.settings
STM32/nucleo_h563/Core
STM32/nucleo_h563/Drivers
STM32/nucleo_h563/Debug
STM32/nucleo_h563/.cproject
STM32/nucleo_h563/.project
STM32/nucleo_h563/.mxproject
STM32/nucleo_h563/ad4170_iio Debug.launch
STM32/nucleo_h563/STM32H563ZITX_FLASH.ld
STM32/nucleo_h563/STM32H563ZITX_RAM.ld
STM32/sdp_k1/.settings
STM32/sdp_k1/Core
STM32/sdp_k1/Drivers
STM32/sdp_k1/Debug
STM32/sdp_k1/.cproject
STM32/sdp_k1/.project
STM32/sdp_k1/.mxproject
STM32/sdp_k1/ad4170_iio Debug.launch
STM32/sdp_k1/STM32F469NIHX_FLASH.ld
STM32/sdp_k1/STM32F469NIHX_RAM.ld
scripts/__pycache__
tests/.pytest_cache
tests/__pycache__
tests/func/__pycache__
tests/output
tests/output
*.vgdbsettings
*.vcxproj
*.props
*.xml
*.vcxproj.filters
46 changes: 2 additions & 44 deletions projects/ad4170_iio/README.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1,8 @@
Evaluation Boards/Products Supported
------------------------------------
EVAL-AD4170
EVAL-AD4171
EVAL-AD4172
EVAL-AD4190

Please refer to the following page for the guidelines on using the AD4170 IIO Application:

Overview
--------
This is an IIO ecosystem based firmware application to evalute the AD4170 devices.
This code was developed and tested on SDP-K1 controller board on mbed platform : https://os.mbed.com/platforms/SDP_K1/.
Use of Mbed platform allows code to port on other Mbed supported target boards with little or no modifications.
The Nucleo-H563ZI Board is supported through the STM32 platform: https://www.st.com/en/evaluation-tools/nucleo-h563zi.html
https://analogdevicesinc.github.io/precision-converters-firmware/source/projects/ad4170_iio/ad4170_iio.html

Product details: AD4170, AD4171, AD4172 and AD4190
Product Evaluation board details: EVAL-AD4170-ASD1Z
User Guide for this code: Please contact Product Application Engineer.
Communication Protocol: SPI


Hardware Setup
--------------
Required: SDP-K1 (or alternative Mbed/STM32 enabled controller board), EVAL-AD4170 board and USB cable.

Find further instructions on the hardware connections here:
https://wiki.analog.com/resources/tools-software/product-support-software/ad4170_iio_support#hardware_connections


How to Get Started
------------------
The Firmware supports MBED and STM32 platforms. Import code into the respective platform and compile it to generate the executable binary.

Find detailed instructions for MBED platform here:
https://wiki.analog.com/resources/tools-software/product-support-software/pcg-fw-mbed-build-guide

Find detailed instructions for STM32 platform here:
https://wiki.analog.com/resources/tools-software/product-support-software/pcg-fw-stm32-build-guide

Notes
-----
A detailed user guide on SDP-K1 controller board is available here:
https://os.mbed.com/platforms/SDP_K1/
https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/SDP-K1.html.

A Detailed user guide on Nucleo-H563ZI board is available here:
https://www.st.com/en/evaluation-tools/nucleo-h563zi.html
https://www.st.com/resource/en/user_manual/um3115-stm32h5-nucleo144-board-mb1404-stmicroelectronics.pdf

Copyright (c) 2021, 2023-24 Analog Devices, Inc. All rights reserved.
28 changes: 0 additions & 28 deletions projects/ad4170_iio/STM32/.extSettings

This file was deleted.

24 changes: 24 additions & 0 deletions projects/ad4170_iio/STM32/nucleo_h563/.extSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[ProjectFiles]
HeaderPath=../../app;../../../../libraries/no-OS/util;../../../../libraries/no-OS/include;../../../../libraries/no-OS/drivers/platform/stm32;../../../../libraries/no-OS/iio;../../../../libraries/no-OS/drivers/api;../../../../libraries/precision-converters-library/board_info/;../../../../libraries/no-OS/drivers/eeprom/24xx32a/;../../../../libraries/precision-converters-library/common/;../../../../libraries/no-OS/drivers/adc/ad4170/;

[Groups]
app/=../../app/main.c;../../app/ad4170_regs.c;../../app/ad4170_regs.h;../../app/main.c;../../app/ad4170_iio.c;../../app/ad4170_iio.h;../../app/ad4170_support.c;../../app/ad4170_support.h;../../app/app_config.h;../../app/app_config.c;../../app/app_config_stm32.c;../../app/app_config_stm32.h;../../app/stm32_gpio_irq_generated.c;../../app/ad4170_user_config.c;../../app/ad4170_user_config.h;../../app/ad4170_accelerometer_config.c;../../app/ad4170_accelerometer_config.h;../../app/ad4170_loadcell_config.c;../../app/ad4170_loadcell_config.h;../../app/ad4170_rtd_config.h;../../app/ad4170_rtd_config.c;../../app/ad4170_thermocouple_config.c;../../app/ad4170_thermocouple_config.h;../../app/ad4170_temperature_sensor.cpp;../../app/ad4170_temperature_sensor.h;../../app/stm32_tdm_support.c;../../app/stm32_tdm_support.h;

app/libraries/precision-converters-library/board_info/=../../../../libraries/precision-converters-library/board_info/board_info.c;../../../../libraries/precision-converters-library/board_info/board_info.h;

app/libraries/precision-converters-library/common/=../../../../libraries/precision-converters-library/common/common.c;../../../../libraries/precision-converters-library/common/common.h;

app/libraries/no-OS/drivers/adc/ad4170/=../../../../libraries/no-OS/drivers/adc/ad4170/ad4170.c;../../../../libraries/no-OS/drivers/adc/ad4170/ad4170.c;

app/libraries/no-OS/=../../../../libraries/no-OS/util/;../../../../libraries/no-OS/include;

app/libraries/no-OS/drivers/eeprom/24xx32a/=../../../../libraries/no-OS/drivers/eeprom/24xx32a/24xx32a.c;../../../../libraries/no-OS/drivers/eeprom/24xx32a/24xx32a.h;

app/libraries/no-OS/drivers/platform/stm32/=../../../../libraries/no-OS/drivers/platform/stm32/stm32_delay.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_gpio.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_gpio.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_gpio_irq.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_gpio_irq.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_spi.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_spi.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_uart.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_uart.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_delay.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_irq.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_irq.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_tdm.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_tdm.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_i2c.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_i2c.c;

app/libraries/no-OS/iio/=../../../../libraries/no-OS/iio/iio.c;../../../../libraries/no-OS/iio/iio.h;../../../../libraries/no-OS/iio/iiod.h;../../../../libraries/no-OS/iio/iiod.c;../../../../libraries/no-OS/iio/iio_trigger.c;../../../../libraries/no-OS/iio/iio_types.h;../../../../libraries/no-OS/iio/iio_trigger.h;

app/libraries/no-OS/drivers/api/=../../../../libraries/no-OS/drivers/api/no_os_gpio.c;../../../../libraries/no-OS/drivers/api/no_os_spi.c;../../../../libraries/no-OS/drivers/api/no_os_irq.c;../../../../libraries/no-OS/drivers/api/no_os_i2c.c;../../../../libraries/no-OS/drivers/api/no_os_eeprom.c;../../../../libraries/no-OS/drivers/api/no_os_uart.c;../../../../libraries/no-OS/drivers/api/no_os_tdm.c;../../../../libraries/no-OS/drivers/api/no_os_dma.c;

[Others]
Define=_USE_STD_INT_TYPES;TINYIIOD_VERSION_MAJOR;TINYIIOD_VERSION_MINOR;TINYIIOD_VERSION_GIT;IIOD_BUFFER_SIZE;IIO_IGNORE_BUFF_OVERRUN_ERR;USE_PHY_COM_PORT;NO_OS_VERSION;NUCLEO_H563
File renamed without changes.
28 changes: 28 additions & 0 deletions projects/ad4170_iio/STM32/sdp_k1/.extSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[ProjectFiles]
HeaderPath=../../app;../../../../libraries/no-OS/util;../../../../libraries/no-OS/include;../../../../libraries/no-OS/drivers/platform/stm32;../../../../libraries/no-OS/iio;../../../../libraries/no-OS/drivers/api;../../../../libraries/precision-converters-library/board_info/;../../../../libraries/no-OS/drivers/eeprom/24xx32a/;../../../../libraries/precision-converters-library/common/;../../../../libraries/precision-converters-library/sdp_k1_sdram/;../../../../libraries/no-OS/drivers/adc/ad4170/;

[Groups]
app/=../../app/main.c;../../app/ad4170_regs.c;../../app/ad4170_regs.h;../../app/main.c;../../app/ad4170_iio.c;../../app/ad4170_iio.h;../../app/ad4170_support.c;../../app/ad4170_support.h;../../app/app_config.h;../../app/app_config.c;../../app/app_config_stm32.c;../../app/app_config_stm32.h;../../app/ad4170_user_config.c;../../app/ad4170_user_config.h;../../app/ad4170_accelerometer_config.c;../../app/ad4170_accelerometer_config.h;../../app/ad4170_loadcell_config.c;../../app/ad4170_loadcell_config.h;../../app/ad4170_rtd_config.h;../../app/ad4170_rtd_config.c;../../app/ad4170_thermocouple_config.c;../../app/ad4170_thermocouple_config.h;../../app/ad4170_temperature_sensor.cpp;../../app/ad4170_temperature_sensor.h;../../app/eeprom_config.c;../../app/eeprom_config.h;../../app/stm32_tdm_support.c;../../app/stm32_tdm_support.h;

app/libraries/precision-converters-library/board_info/=../../../../libraries/precision-converters-library/board_info/board_info.c;../../../../libraries/precision-converters-library/board_info/board_info.h;

app/libraries/precision-converters-library/common/=../../../../libraries/precision-converters-library/common/common.c;../../../../libraries/precision-converters-library/common/common.h;

app/libraries/precision-converters-library/tempsensors/=../../../../libraries/precision-converters-library/tempsensors/ntc_10k_44031.cpp;../../../../libraries/precision-converters-library/tempsensors/ntc_10k_44031.h;../../../../libraries/precision-converters-library/tempsensors/ptc_ky81_110.cpp;../../../../libraries/precision-converters-library/tempsensors/ptc_ky81_110.h;../../../../libraries/precision-converters-library/tempsensors/ptxxx.cpp;../../../../libraries/precision-converters-library/tempsensors/ptxxx.h;../../../../libraries/precision-converters-library/tempsensors/rtd.cpp;../../../../libraries/precision-converters-library/tempsensors/rtd.h;../../../../libraries/precision-converters-library/tempsensors/thermistor.cpp;../../../../libraries/precision-converters-library/tempsensors/thermistor.h;../../../../libraries/precision-converters-library/tempsensors/thermocouple.cpp;../../../../libraries/precision-converters-library/tempsensors/thermocouple.h;../../../../libraries/precision-converters-library/tempsensors/thermocouple_lut.cpp;

app/libraries/precision-converters-library/sdp_k1_sdram/=../../../../libraries/precision-converters-library/sdp_k1_sdram/sdp_k1_sdram.c;../../../../libraries/precision-converters-library/sdp_k1_sdram/sdp_k1_sdram.h;

app/libraries/no-OS/drivers/adc/ad4170/=../../../../libraries/no-OS/drivers/adc/ad4170/ad4170.c;../../../../libraries/no-OS/drivers/adc/ad4170/ad4170.c;

app/libraries/no-OS/=../../../../libraries/no-OS/util/;../../../../libraries/no-OS/include;

app/libraries/no-OS/drivers/eeprom/24xx32a/=../../../../libraries/no-OS/drivers/eeprom/24xx32a/24xx32a.c;../../../../libraries/no-OS/drivers/eeprom/24xx32a/24xx32a.h;

app/libraries/no-OS/drivers/platform/stm32/=../../../../libraries/no-OS/drivers/platform/stm32/stm32_delay.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_gpio.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_gpio.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_spi.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_spi.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_uart.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_uart.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_delay.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_irq.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_irq.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_tdm.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_tdm.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_i2c.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_i2c.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_pwm.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_pwm.c;../../../../libraries/no-OS/drivers/platform/stm32/stm32_dma.h;../../../../libraries/no-OS/drivers/platform/stm32/stm32_dma.c;

app/libraries/no-OS/iio/=../../../../libraries/no-OS/iio/iio.c;../../../../libraries/no-OS/iio/iio.h;../../../../libraries/no-OS/iio/iiod.h;../../../../libraries/no-OS/iio/iiod.c;../../../../libraries/no-OS/iio/iio_trigger.c;../../../../libraries/no-OS/iio/iio_types.h;../../../../libraries/no-OS/iio/iio_trigger.h;

app/libraries/no-OS/drivers/api/=../../../../libraries/no-OS/drivers/api/no_os_gpio.c;../../../../libraries/no-OS/drivers/api/no_os_spi.c;../../../../libraries/no-OS/drivers/api/no_os_irq.c;../../../../libraries/no-OS/drivers/api/no_os_i2c.c;../../../../libraries/no-OS/drivers/api/no_os_eeprom.c;../../../../libraries/no-OS/drivers/api/no_os_uart.c;../../../../libraries/no-OS/drivers/api/no_os_tdm.c;../../../../libraries/no-OS/drivers/api/no_os_pwm.c;../../../../libraries/no-OS/drivers/api/no_os_dma.c;

[Others]
Define=_USE_STD_INT_TYPES;TINYIIOD_VERSION_MAJOR;TINYIIOD_VERSION_MINOR;TINYIIOD_VERSION_GIT;IIOD_BUFFER_SIZE;IIO_IGNORE_BUFF_OVERRUN_ERR;USE_PHY_COM_PORT;NO_OS_VERSION;TARGET_SDP_K1
Loading

0 comments on commit 889d292

Please sign in to comment.