 Hello, welcome back. This is part 5 of the series. In this video, I will show you a hands-on demo of how to run a food recognition application using the QSPI external flash on the STM32-H747I Discovery board. But first, let's take a look at the folder organization for the FPEI Vision 1 function pack. This has a content in the function pack. The driver's folder contains all the BSP, CMC, and STM32-H7 whole driver source code. In the middle-ware folder, there is an STSAP folder. Includes several libraries, and a third-party folder includes the FAT file system support. Next is the project folder. It contains the projects and the source code for the applications. These applications are running on the STM32-H747I Discovery board. For version 3.0, we have four applications. The Food Recognition, People Counting, Person Presence Detection, and USB webcam. Now let's see what's inside the Food Recognition application. There is one folder for float model, and another one for quantized model. In each model, there is a binary folder that contains all the example binaries I talked about in the previous videos. And there are source code for different IDEs. Same here for the Quantized model. Finally, it's a Utilities folder. In the AI Resources Food Recognition, you can find the original model, the files requested for the quantization process, the quantized model, and the scripts for retraining and data conversion. For more details, you can refer to the UM2611. All the information for this video are obtained from there. Okay, now let's start the hands-on demo. These are the prerequisites you need. Of course, the RPEI Vision 1 function pack, IDE. I'm going to use SCM32Q by IDE in this demo. It is free to from ST. For hardware, you will need the SCM32H747ID discovery board, the B-CAM OMV camera board, and USB to micro USB cable to connect the board to your computer. This is a hardware setup. Connect the camera board with the discovery board using a 30-pin flex cable, and connect the USB cable to CN2 connector for ST-Link to your computer. Now, let's get started. First, you can find an example illustrating how to place the weight on the BIOS table in the external flash memory, in the folder projects, STM32H747IDsco, application, food record, mobile net, derivative, and float model. I'm using cube IDE, so go into the corresponding folder, and you will see a .project file. Double click to open the project, choose your workspace, and click launch. Wait for cube IDE to import the project, and click OK when it's done. There are two sub-projects, CM4 and CM7 here. We only need to configure the CM7 project. Different memory configurations are already included in this project. To change the configuration, first click to choose the CM7 project. Then in the menu bar, click project, build configurations, set active. Here you can see six different configurations, and let's choose the float external QSPI1. Now the configuration of float model using external QSPI flash is activated. Then click project, practice. In the CEC++ general menu, find path and symbols, and switch to the symbols tab. Here you can find the flags to define. First we need to make sure the weight QSPI is set to 1, and the weight QSPI program is set to 0. This will define a memory placement section in the memory range, corresponding to the chord SPI memory interface. In our case, it's 0x900000 and place a table of weights and biases into it. For some configurations, the weight EXEC, EXT RAM is also set to 1. This means the weight and biases table is copied from external QSPI flash into the external ST RAM at program initialization, which will speed up the inference. For example, the float EXT ST RAM and the float SPLIT ST RAM examples. Okay, now let me switch back to the external QSPI configuration. After setting the flags, click apply and close. The next step is very important, which is to enable the external loader for the H747 discovery board. To do that, simply click run and find debug configurations, click that, then switch to the debugger tab. Scroll down to find the external loader under MISC. Enable the external loader and click the scan button to find the loader files. Then click the drop-down menu and find the loader file for H747 discovery board, which uses MT25 TL01G NOR flash. And then you can click apply and close the window. Now all the settings are done, you can either click the little bug button to start debugging or click the play button to run the application. Let me click the debug, wait for CUBE IDE to build and program the project. You will see build was successful and asking you to switch to the debug perspective. Just click switch and wait for the downloading. After download verified successfully, we are in debug mode. Now click the resume button. You should see the welcome screen on your discovery board like this. It tells you the version of the function pack, what application is running, the model, the resolution and which memory configuration is used, etc. You can see we are using weight and biases table in the external QSPI flash. Next, let's try using the external SDRAM. Let me end the debugging first, then clean the project. In the project properties in C C++ general, path and symbols change the weight EXEC EXTRAM to 1. Click apply and close and the pop up window will ask you, do you want to rebuild the project? Just simply click yes. This time I will use the run. Click the play button, wait for the program to build and flashed. Downloading progress, verifying, download verified successfully and shutting down. This time you will see the welcome screen showing that the weight and the bias in external SDRAM. In the user manual 2611, page 27, table 6, you can find all combinations of these compile flags. When you're developing your own applications, you can take the advantage of the external memories on H747 discovery board. Thank you for taking your time to watch this video. In the next video, we will briefly go over some other features like onboard validation, frame capture and testing modes. See you in the next video.