cancel
Showing results for 
Search instead for 
Did you mean: 

HAL: Porting from L4 to U5: flash and flush (caches)

FKaes.1
Associate II

Hello, I'm porting code from L4 to U5. The original code was able to change flash during runtime (erase and program). The L4 Hal lib deactivated caches before flash operation and flushes them afterwards. This isn't done by the U5 Hal lib. I don't need explanation. It is ok for me, if you can confirm, that there is not risk, when cache is enabled during the programming U5.

FKaes1_0-1744119836473.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Saket_Om
ST Employee

Hello @FKaes.1 

The deactivation and flash of the cache in the STM32G4 when performing flash operation is due to the implementation of the workaround for the errata 2.2.13.

Saket_Om_0-1744128801176.png

This is not the case for STM32U5. 

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar

View solution in original post

2 REPLIES 2
Saket_Om
ST Employee

Hello @FKaes.1 

The deactivation and flash of the cache in the STM32G4 when performing flash operation is due to the implementation of the workaround for the errata 2.2.13.

Saket_Om_0-1744128801176.png

This is not the case for STM32U5. 

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar
FKaes.1
Associate II

Hello, Thanks. I assume the G4 workaround relates also to the L4. Additional, I'm using a U5 with 1MB (=> 1 Bank). Then this issue should not happen anyway.