cancel
Showing results for 
Search instead for 
Did you mean: 

How to place image buffer into external RAM of STM32N6570-DK

pawatJoy
Associate III

Hello

      I'm working with the STM32N6570-DK board to capture images using the IMX335. I want to save 480x800 images from PIPE1 of DCMIPP to External RAM. I've tried searching for examples on the STMicroelectronics Github, but most examples save to AXISRAM. Does anyone have simple example code or steps for doing this? Do i need to config xSPI first? or do i need to put something into ".ld" file?

3 REPLIES 3
LCE
Principal II

Probably both.

I don't know the N6 yet, but ...

usually first you need to set up the external RAM in memory mapped mode (I think there's a 16-bit PSRAM on the DK?), then define that area in the linker file, then place the buffers via attributes into external RAM.

Better check RM & DS - or even better some examples if available.

pawatJoy
Associate III

Thank you for your answer.

Can I apply the steps in this link and just change the memory config and address to xSPI1?

How to use external Flash or RAM with STM32? 

pawatJoy_0-1771314359320.png

 

 

nico23
Senior III

Hi @pawatJoy 

If you use TouchGFX Designer, you can create a sample TouchGFX project with ThreadX or FreeRTOS. It will automatically create and set up a project using the 256-Mbit Hexadeca‑SPI PSRAM for the framebuffer.

It will basically configure the xSPI and will map it to the internal CPU memory addresses so, so from the application, you can access it easily. You'll need to look into the MX_XSPIx_Init where x is the XSPI number.

Depending on what you're using, you'll see the .ld or .icf file (linker) that the frame buffer uses. The frame buffer is defined in TouchGFX/target/generated/TouchGFXGeneratedHAL.cpp

You can basically copy the same approach and create another buffer for your personal use.