cancel
Showing results for 
Search instead for 
Did you mean: 

Using SBSFU application on another device

Istillaga
Senior

Hi,

I want to use the SBSFU application on the STM32U575ZIT6 microcontroller instead of the B-U585I-IOT20A board. Is this possible? If it can be done, what steps should I follow?

5 REPLIES 5
Jocelyn RICARD
ST Employee

Hello @Istillaga ,

This is very easy indeed :)

The STM32U575 does not have crypto hw acceleration used by the SBSFU.

So, you need to disable it by commenting the enable of hw acceleration flag in config-boot.h line 33

#ifndef MBEDTLS_CONFIG_BOOT_H
#define MBEDTLS_CONFIG_BOOT_H

/* HW accelerators activation in BL2 */
//#define BL2_HW_ACCEL_ENABLE
#define MBEDTLS_ECP_NO_INTERNAL_RNG

Then you need to remap the 2 LEDs used in the example. To know the mapping you can check the schematics provided on st.com.

Basically you need to replace in main.h of secure application at line 60

#define LED1_Pin GPIO_PIN_7
#define LED1_GPIO_Port GPIOH
#define LED1_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE()
#define LED2_Pin GPIO_PIN_6
#define LED2_GPIO_Port GPIOH
#define LED2_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE()

by

#define LED1_Pin GPIO_PIN_7
#define LED1_GPIO_Port GPIOC
#define LED1_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define LED2_Pin GPIO_PIN_7
#define LED2_GPIO_Port GPIOB
#define LED2_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()

Best regards

Jocelyn

With those two changes, is it enough for it to work on the stm32u575zit6? And if I want to add my BSP and external and internal drivers, is it enough to delete the existing drivers and replace them with mine?

Jocelyn RICARD
ST Employee

The changes I shared allow you to run the SBSFU example on Nucleo board.

One other change to perform if you want to avoid issues is to change STM32U585xx by STM32U575xx in the projects.

From this working base, you can make whatever change you need for your project

Best regards

Jocelyn

 

I'm not referring to the Nucleo board. I have a board that I created myself, which contains the STM32U575ZIT6 microcontroller. Would it be the same process as the Nucleo?

Jocelyn RICARD
ST Employee

Yes sure.

As I said, only change needed concerns the disabling of HW crypto

All the rest is the adaptation to your board. Especially the UART trace which is useful.

Best regards

Jocelyn