cancel
Showing results for 
Search instead for 
Did you mean: 

SBSFU - STM32H755 Optimization Problem

YChen.16
Associate

I'm working on a project with SBSFU implemented on STM32H755. I'm using slot 1 for CM7 and slot 2 for CM4. I'm using the IAR workbench. Both CM4 and CM7 hex files work just fine in debug mode and everything seems to work with SBSFU implementation. But when I'm trying to test the performance of the code. I found that the SBSFU version has lower performance than I expect. The use case is there are two interrupt services (SPI 2Mbps, UART for MODBUS 500kbps) that may occur at the same time and SPI has a higher priority. In debug mode, everything works just fine. But in SBSFU mode, with the same bin files and the same SPI/UART communication requests, I got a lot of timeout errors for MODBUS. The optimization level now is the highest for speed and no size constraint. I was wondering if SBSFU affected the performance of the same code. Any suggestions or information are appreciated.

1 REPLY 1
Jocelyn RICARD
ST Employee

Hello @YChen.16​,

the SBSFU is setting up the chip configuration in order to get maximum security. It is possible that some settings made by SBSFU need to be changed once the application is running.

I would check: Clocking full setting, cache configuration and MPU configuration on first glance.

If you have no idea where to look at, a way to rapidly compare can be to use the STM32CubeProgrammer Registers (Beta) feature. This allows dumping all the registers of the platform in a file.

To use it, add a while(1) in your application after all inits are done.

Launch application, attach to target in hotplug, and dump all registers

Do the same with SBSFU launching application first.

Then comparing register may help pointing out where issue is.

This technique will not work for MPU settings for instance because registers do not provide actual configuration. For this you need to check with your code.

Best regards

Jocelyn