cancel
Showing results for 
Search instead for 
Did you mean: 

Single Image Download on Dual Bank MCU

SScla
Associate II

Hi,

I've some problem in understanding why it's not possible to use the single image download on Dual Bank MCU, as "reported" in the following picture (ref. UM2262 pg.54 par. C.2 Mapping Definition).

0690X000008aFnlQAE.png

Could someone give me more details about this limitation ? 

Many thanks,

Stefano

1 REPLY 1
Jocelyn RICARD
ST Employee

Hello Stephano,

I'm sorry of late answer, just noticed your request.

All details are written in the note 1.

The issue with single image with dual bank MCUs is that firewall configuration does not follow the bank swap.

It you setup the firewall on bank 1, at address offset 0x200 from beginning of flash and issue a bank swap, the firewall will still protect this offset in flash but the bank have swapped. So, the data protected in bank 1 is no more protected.

The only way to overcome this, is to have the firewall setting code protection at an offset in bank1 and readonly data protection at same offset on bank2.

This way, if you perform a swap, all data remain protected.

With two images setup, the header of the firmware is put in the second bank at this specific offset.

In one image mode, you could do the same, but the header would fall in the middle of the application code which is complex to handle.

This is possible to modify SBSFU to do this but will take some time.

Other possibility is to accept the risk. This means you think there is no chance to have code injection that would perform the swap and retrieve the secret key.

In that case, you can port a single image example to your dual bank target.

I hope this will help understanding

Best regards

Jocelyn