Skip to main content
Visitor II
March 10, 2025
Question

STM32N6 VENC at higher resolutions

  • March 10, 2025
  • 12 replies
  • 2768 views

Hi,

We have STM32N6570-DK and are testing camera input, video encode and write to SD card

We have not been able to make the "VENC_SDCard_Appli" example work, the SD card just contains zeros.

The "VENC_SDCard_ThreadX" example does work however, resulting in an 800x480 video.

Are there any examples on encoding at 1080p resolution? Changing the encoder parameters and level results in memory allocation failures in EncAsicMemAlloc_V2.

Many thanks

 

    This topic has been closed for replies.

    12 replies

    ST Employee
    March 11, 2025

    Hello @therealnerd2 

    Can you provide details about the reading of the SD card for the VENC_SDCard_Appli demo? Did you follow all the recommendations in the Readme.html of this project below:

    • The configuration of OTP124 fuses VDDIO3_HSLV=1 I/O XSPIM_P2 High speed option enabled.
    • Have you signed and programmed the FSBL in external memory at address 0x7000 0000 and the Application at 0x7010 0000 by applying the correct header (STM32_SigningTool_CLI.exe)?
    • Are you viewing the image from the OV5640 camera on the LCD screen?
    • The re-reading of the SDCard must be done in raw mode as explained in the Readme.html in the section After execution.

    Best regards

    Romain,

    Visitor II
    March 11, 2025

    Hi,

    We have been testing by running directly from the Cube IDE, and using Run and Debug. 

    We have not flashed or programmed the OTP.

    We can see the image on the LCD screen.

    Command to read SD card attached.

    Thanks.

     

    Visitor II
    March 11, 2025

    If I step through the example, I can see that "encoder_prepare" is actually failing, but the error is not being checked.

    The error comes from EWLmalloc, which is not able to allocate any memory.

    Visitor II
    March 11, 2025

    I see this is https://github.com/STMicroelectronics/STM32CubeN6/issues/1. With that patch, the example now runs and the SDcard is now readable.

    Visitor II
    March 11, 2025

    Can you please:

    1) confirm if the patch in that issue is valid

    2) explain how to increase the recording resolution to 1080p

    ST Employee
    March 12, 2025

    Hello @therealnerd2 ,

    Unfortunately, increasing the resolution to 1080p within VENC_SDCard_ThreadX requires a bit of work. The fact is that 1080p won't fit into the internal memory as in the original application. Camera and encoder buffer allocation requires some rework to be placed in external memory.

    Best regards,

    Daniel

    Visitor II
    March 12, 2025

    Hi Daniel,

    Thanks for the reply, this makes sense with what we are seeing.

    Is such an example using external memory planned? It's a shame for a chip advertised as 1080p capable that we cannot easily prove this working and test power usage.

    Many thanks.

    ST Employee
    March 13, 2025

    Hi therealnerd2,

    I understand your frustration.
    We will strive to provide a 'ready-to-use' 1080p example in upcoming releases

    Best regards,

    Daniel

    Visitor II
    March 13, 2025

    Great, thank you

    Visitor II
    March 13, 2025

    Do you have any (estimated or actual) power consumption numbers for the device when doing a 1080p encode? Including the external memory ideally. 

    Thanks

    ST Employee
    May 26, 2025
    Graduate
    May 27, 2025

    Thank you @DanielS, that is a great reference!

    Will this example soon be available in the STM32CubeN6 github?

    Alternatively, where can the reference example be found that was used to take the power measurements?

    Thank you in Advance.