on 2025-06-18 6:00 AM
This article provides a quick guide on how to enable overdrive mode on the STM32N6 Discovery kit and configure your project accordingly. It includes instructions and explanation on configuring overdrive mode, responsible for changing the VDDCORE's voltage to 0.89 V instead of the typical 0.80 V using STM32Cube’s ecosystem. This allows the STM32N6570-DK to achieve its highest CPU and Neural-ART accelerator (NPU) frequencies up to 800 MHz and 1 GHz, respectively.
The overdrive mode on the STM32N6 board is a power and performance configuration that allows the MCU to run at higher frequencies with optimized voltage scaling. This operation mode allows the Cortex®-M55 core to run at up to 800 MHz by increasing the core voltage (VDDCORE) to 0.89 V through the internal SMPS (switched-mode power supply). This mode balances power and performance using dynamic voltage and frequency scaling and is supported by the board’s power management design.
By default, the STM32N6 uses the typical core voltage (VDDCORE= 0.8 V). To use its high-frequency features, overdrive mode is a must. We use the STM32N6570-DK for this tutorial.
The STM32N6570-DK uses external memories at 1.8 V voltage and relevant I/Os should be configured from the 3.3 V default using firmware or software and OTP to get nominal speed.
Be aware that setting HSLV_VDDIOx and VDDIOxVRSEL bits while VDDIOx is in the 3.3V range damages the device.
This article provides a quick guide on what the STM32N6’s OTP bits are and how to program them accordingly.
This article assumes you have installed STM32CubeMX (6.13 or later), the latest version of the STM32N6 HAL driver, STM32CubeProgrammer (2.18 or later), and STM32CubeIDE (1.18.0 or later). The hardware used to showcase is the STM32N6570-DK and make sure you have it in DEV boot mode to program the code:
Be sure to add the postbuild step to your STM32N6 project when using STM32CubeIDE. This step can be done by following the tutorial in this article.
Custom configurations in STM32CubeMX are required to set up the overdrive correctly.
Create a new project using the STM32CubeMX and select the [STM32N657X0H3Q]. Select the option to use the [Secure Domain only].
On STM32CubeMX, you need to turn on PF4 (usually turned off by default) to get the VDDCORE to 0.89 V (OVERDRIVE). This is shown in the Discovery kit schematic, on page 5.
Locate the PF4 and configure it as GPIO_Output and use the label to name it SMPS_OVD.
Also, locate the PO1 and configure it as GPIO_Output and use the label to name it GREEN_LED.
We need to assign both GPIOs to be used by the FSBL.
The next step is to configure the RCC by enabling the MCO1 and MCO2 (automatically assigned to PA8 and PC9, respectively). By reproducing this step, we can later confirm the desired frequency output value using an oscilloscope.
Along with that, on the “Clock Configuration” tab, activate the following:
Back to the “Pinout & Configuration” tab, you need to turn on the ICACHE feature to make the most out of the overdrive mode.
Since we already set the VDDCORE to 0.89 V, the next step shows the correct clock tree configuration to have the maximum frequency output on the CPU, NPU, and AXISRAM3/4/5/6.
In STM32CubeMX’s “Clock Configuration” tab, follow according to the image below:
In the main.c file, you need to add a MX_GPIO_Init() function before the SystemClock_Config(). We need to configure the correct tension on VDDCORE first, so that the clock value can be properly set up. This way, we ensure the CPU’s correct operation.
Note: The duplicate MX_GPIO_Init() should not cause any problems.
/* USER CODE END 1 */
/* Enable the CPU Cache */
/* Enable I-Cache--------------------------------------------------*/
SCB_EnableICache();
/* Enable D-Cache--------------------------------------------------*/
SCB_EnableDCache();
/* MCU Configuration-----------------------------------------------*/
HAL_Init();
/* USER CODE BEGIN Init */
/* Initialize all configured peripherals before the SysClock */
MX_GPIO_Init();
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_ICACHE_Init();
/* USER CODE BEGIN 2 */
To see your application running, you can use the MCO2 pin configured before. This pin can be found in the CN4 socket, as shown in the Discovery kit schematic (page 10), or at the TP2 and TP3 test points.
Note: During the “STM32CubeMX Configuration” portion of this article, we configured the MCO2 frequency with a /10 divider. This modification allows us to measure the CPU frequency with most scopes precisely.
The final wave should be something like the following:
In this article, we explored how to configure STM32N6 microcontrollers’ Overdrive mode, as well as how to validate this change using simple methods and configurations. By adjusting the hardware to the specific voltage settings and constraints, it is possible to ensure maximum performance and reliability of your embedded applications.