I can't figure how to use external SDRAM for camera&LCD buffer and AI can someone help me please ? (STM32F769I-EVAL)
Hello,
I used the example DCMI_CaptureMode for the STM32F769I-EVAL and the CubeMX generator with CubeAI in order to make an object classifier on board. It worked well with the internal RAM for 28*28*1 pictures but now that I want it to work for 128*128*3 pictures, it needs more RAM, but I can't achieve to use the external SDRAM:
The issue is: if I use MX_X_CUBE_AI_Process(); the screen freezes, and if I don't use it, I still have issues calling BSP_LCD_FillRect() => it doesn't show a rectangle whereas on other projects, it did.
Question 1: Can we see how much of the external RAM is reserved to CubeAI ? (in order to use the rest of the external RAM for peripherals)
Question 2: Do you have an idea on how to deal with my issue ? Anything would be welcome.
Here is the way I tried to tackle the issue:
-> I used the advanced option to use the external SDRAM for CubeAI, but it comes in conflict with the camera and LCD buffers (LCD_FRAME at 0xC0000000, Camera_FRAME at 0xC0177000, and I believe RAM allocated to AI started at 0xC0000000 too).
-> I tried to move the LCD/Camera buffer and it didn't help, same when I moved the MPU_InitStruct.BaseAddress that was generated by CubeMX with CubeAI using external RAM. (I believe because of this change, that "MPU_InitStruct.BaseAddress" is the value that change where the AI starts using RAM but I'm certainly wrong).
+ Reading "Application Note - Managing memory protection unit in STM32 MCUs", the part 3.4 says "When a speculative prefetch happens, it may impact
memories or devices which are sensitive to multiple accesses (such as FIFOs, LCD controller)." but I don't really get the explanation on how to configure it...
[Edit: write the end of the issue as I posted the question while writing it]
