Please confirm if STM32 MCU supports SEC or ECC features
What is "SEC or ECC features"?
and in what STM32 part or family, there's a shed load at this point. Remember ask questions where you provide context for those not living in your head.
Single-bit Error Correction? There are parts with 36-bit (32+4) flash words, which can detect multi-bit error, and a correct single-bit error. ST really hasn't provided much implementation detail for these.
Retrieving data ...