This system uses the AD7177-2 ADC to read 3 input channels (AIN0–AIN2, AIN4 as common) and send data over Ethernet via UDP at ~2450 Hz total (~817 Hz/channel). The firmware should be flashed onto an STM32H723ZG using STM32Cube IDE.
If reconfiguring anything in CubeMX (ioc file), there are some changes that must be made to the autogenerated code in main.c. In the MX_GPIO_INIT function, remove "HAL_NVIC_EnableIRQ(EXTI9_5_IRQn)". This is the last line of the function. Additionally, remove "MX_LWIP_INIT()" from "startDefaultTask()".
There are currently two different "HAL_SPI_TxRxCpltCallback()" functions, and one is commented out. The function that is currently enabled waits for all channels to be read before adding data to spiData. When using this function, run the script ‘v2_UDP_Socket.py’ to create a file with data, and ‘Import_data.ipynb’ to process the data.
The function that is currently commented out adds data to spiData after every read of the register. When using this function, run the script ‘v3_UDP_Socket.py’ to create a file with data, and ‘v2_Import_data.ipynb’ to process the data (sorry I know this is confusing).
For more information on the system, see "Accelerometer System Status Update July 2025" in the document library, added on July 8, 2025.