Getting started with X-CUBE-ISP

1. X-CUBE-ISP v2.0.0

The X-CUBE-ISP package provides the functionality to control and tune the DCMIPP ISP present in STM32N6x products.

It contains:

  • Embedded ISP library middleware (running on the target) hosting 2A algorithms (auto exposure and auto white balance) and mechanisms to control the ISP and load the sensor tuning file.
X-CUBE-ISP/Middlewares/ST/STM32_ISP_Library
  • A tuning application (running on the target) allowing interaction with the STM32 ISP IQTune desktop application, executed on the host computer and connected through USB.
X-CUBE-ISP/Projects/DCMIPP_ISP/ISP_IQTune_App

To take control of the DCMIPP ISP:

  • The host computer must execute the STM32 ISP IQTune desktop application and connect to the target with a USB-C cable on the USB1 (CN18) connector of the board.
  • The ISP IQTune app must be loaded and launched on the target.
N6 board connection.png

2. Demonstrated features

  • Control of all ISP parameters via desktop application
  • Image analysis function for camera sensor tuning
  • Generation of sensor ISP tuning file
  • Embedded auto exposure algorithm (AE)
  • Embedded auto white balance algorithm (AWB)
  • IQTune application

3. Hardware support

  • MB1939 STM32N6570-DK board
    • The board must be connected to the onboard ST-LINK debug adapter CN6 with a USB-C to USB-C cable to ensure sufficient power.
    • An additional USB-C cable is necessary to connect USB1 (CN18) to the host computer for the STM32 ISP IQTune desktop application connection.
  • Supported camera modules are:
    • MB1854B IMX335 (default camera module provided with the MB1939 STM32N6570-DK board)
    • VD66GY 1.5-megapixel CMOS image sensor and its monochrome version VD56G3
    • VD1943 5-megapixel CMOS image sensor and its monochrome version VD5943
    • VD65G4 ultracompact and low-power color image sensor

4. Prerequisites

5. Install X-CUBE-ISP ISP package

Download the X-CUBE-ISP package from github.

6. Boot modes

STM32N6 devices have no internal flash memory. To retain firmware after a reboot, program it in the external flash memory. Alternatively, load the firmware directly from SRAM (dev mode).
In dev mode, if the board is turned off, the program is lost.

Boot modes:

  • Dev mode: load firmware from debug session in RAM (BOOT1 switch to the right, BOOT0 switch position unimportant)
  • Boot from flash: program firmware in external flash memory (BOOT0 and BOOT1 switch to the left)

7. Quick start using prebuilt binaries

The X-CUBE-ISP/Projects/DCMIPP_ISP/Binary directory hosts the ISP IQTune prebuilt application, which is the tuning application (running on the target) that allows interaction with the STM32 ISP IQTune application executed on the host computer and connected through USB.

Applications are available for the MB1939 STM32N6570-DK board.

  1. Toggle BOOT1 switch to the right position
  2. Program X-CUBE-ISP/Projects/DCMIPP_ISP/Binary/STM32N6_ISP_IQTune_App-trusted.bin as described in the program bin files using command line section
  3. Toggle BOOT0 and BOOT1 switches to the left position
  4. Reset board

8. Quick start using source code

Make sure the boot switches are in dev mode (BOOT1 is on the right side).

8.1. STM32CubeIDE

Double-click on X-CUBE-ISP/Projects/DCMIPP_ISP/ISP_IQTune_App/STM32N6570-DK/STM32CubeIDE/.project to open the project in STM32CubeIDE.
Build and run using the build and run buttons.

8.2. Change the camera module

The software is natively compatible with one of the camera modules listed in Hardware support chapter. Simply change the camera module and restart the software. No software reconfiguration is needed.

Info white.png Information
Support for customer sensors is possible if they comply with the driver and integration format of the camera middleware. The sensor driver must be integrated into the middleware.

Initially, the STM32 IQTune application can be run using the default ISP_IQParamCacheInit_UNTUNED configuration in the isp_param_conf.h file. This allows starting camera streaming with default parameters, producing frames with correct brightness. However, to properly run the 2A algorithm and achieve the expected image quality, a first tuning must be performed using the STM32 ISP IQTune desktop application. This tuning generates a new isp_param_conf.h file specific to the customer sensor, which can then be updated in the system.

8.3. Create binary for boot from flash memory

Make sure the STM32CubeProgrammer bin folder is added to the path before executing the following command:

STM32MP_SigningTool_CLI -bin STM32CubeIDE/release/STM32N6_ISP_IQTune_App.bin -nk -t fsbl -hv 2.3 -o STM32N6_ISP_IQTune_App-trusted.bin


8.4. Program bin files using command line

Make sure the STM32CubeProgrammer bin folder is added to the path before executing the following commands:

export DKEL="<STM32CubeProgrammer_N6 Install Folder>/bin/ExternalLoader/MX66UW1G45G_STM32N6570-DK.stldr"

STM32_Programmer_CLI -c port=SWD mode=HOTPLUG ap=1 -el $DKEL -hardRst -w X-CUBE-ISP/Projects/DCMIPP_ISP/Bin/STM32N6_ISP_IQTune_App-trusted.bin 0x70000000

9. Known issues and limitations

  • No known issue