Introduction: ADC Graph on STM32F769I Disco
Assuming you already know whats ADC (other wise :https://en.wikipedia.org/wiki/Analog-to-digital_co...).
The ADC on board of STM32F7 is one of the most powerful peripheral with a sampling rate of 2.4 Million samples per second, all the way up to 7.2 MSPS (So it can measure signals with large bandwidth, Nyquist criteria) on Triple interleaved mode i.e Using all 3 SAR ADC blocks which are provided in the Microcontroller.
for more info ST's ADC implementation :https://www.st.com/content/ccc/resource/training/t...
In this instructable, Second most important element is the Graphics Middle ware from SEGGER.
The Embedded Experts
SEGGER Microcontroller provides professional development and production solutions for the embedded market. All SEGGER products are highly optimized, "simply work" and benefit from more than 25 years of experience in the industry. For more info https://www.segger.com/
Segger middle ware has a very nice set of Widgets (Element of GUI) through which one can create nearly any advanced GUI application!
Best part is that it can be used with Any Display on Any Device i.e you first need to get your display say ILI9341 working on your target MCU with Low level drivers (you might have to write on your own with datasheet as reference if no library is already available). Once the display is working with basic drivers, the Display routines can be adapted to LCD Configuration of Segger Middle ware (This can be difficult some times).there by coupling LLD with Middle ware.
Kit like https://www.st.com/en/evaluation-tools/32f769idiscovery.html will make your life easy if you are beginner and just want to get started playing around with Middlewares and applications without worrying about LLDs for on board peripherals.
Step 1: Software
1. Install Keil MDK 5 for ARM.
2. Install Device Family Pack (DFP) for STM32F7 family in Keil MDK 5
3. Install CubeMx from ST
4. Install ST Link drivers
Keil MDK 5 with demo license has a code Limit of 32K, A viable alternative being SW4STM32 - System Workbench for STM32: free IDE on Windows.
In the package installer of Keil MDK5 find the examples for Segger which is ready to compile and Flash to run on STM32F7 Disco.
I used the emWin Example as base for developing my graph, Building the work space manually by including all the Libraries for Peripherals like Display, Clock, Memory etc can be tedious. Examples on the other hand need just some editing in Configurations and comments make things lot easy.
CubeMx is used to Make setting up of ADC or any other peripherals very easy and graphical. All the settings needed for flashing are already taken care such as memory address for ROM, RAM, Clock etc.
Step 2: Hardware
The only external hardware needed in this instructable is a signal source (in my case a simple Potentiometer) to be plotted.
Initialize and Setup ADC through CubeMx for ease.
Every IO Pin with ARM Cortex MCUs have many alternate functionalities (multiplexed), so it very important to choose a pin that is not being used by other peripherals like RAM, Display etc
i chose PF10/(A3 arduino)/channel 8 of ADC3 since it was broken out with header on my kit and is not used for other functions.
CAUTION : NOT ALL IOs are 5V tolerant, limit input voltage to 3.3V!
Step 3: Code
The Code was heavily inspired by Sever Spanulescu
i modified his code without touch input for now. So all the credit goes to Sever Spanulescu :-P
The RTOS configurations have changed due to update a lot and thread configs are very different compared to the video(2016) .
i have attached Binary here which can be flashed through ST-Link utility for quick evalution. For full project https://github.com/KiranKanchi/STemWin , feel free to hack around.
1. Add oscilloscope like controls
2. FFT plot of Analog Data for frequency domain analysis.
3. Increase sampling rate through interleaved mode.