Skip to main content
Mkuma.7
Associate III
Feb 17, 2023 9:30 AM UTC
Solved

Is there any way to write 32 bytes in flash without affecting the other memory elements?

Is there any way to erase 32bytes in flash?

This topic has been closed for replies.
MM..1
MM..1Best answer
Super User
Feb 20, 2023 1:51 PM UTC

no

17 replies

KnarfB
Super User
Feb 17, 2023 9:55 AM UTC

What chip exactly?

Mkuma.7
Mkuma.7Author
Associate III
Feb 20, 2023 5:44 AM UTC

STM32WB55VGY6TR

MM..1
Super User
Feb 17, 2023 10:02 AM UTC

Based on flash type and ECC support you can once write into one empty element . Size may differ and is based on bits ...

Mkuma.7
Mkuma.7Author
Associate III
Feb 20, 2023 5:49 AM UTC

Is there any way to erase 32bytes in flash?

MM..1
MM..1Best answer
Super User
Feb 20, 2023 1:51 PM UTC

no

Mkuma.7
Mkuma.7Author
Associate III
Feb 21, 2023 7:36 AM UTC

ok thank you

Mkuma.7
Mkuma.7Author
Associate III
Mar 7, 2023 11:31 AM UTC

Is there any way where we can write a bin file without affecting other memory locations?

Pavel A.
Mar 7, 2023 2:33 PM UTC

Yes. Given that the space for the binary is already erased.

Is there any way to write 32 bytes in flash without affecting the other memory elements? Yes.

Is there any way to erase 32bytes in flash? No.

Mkuma.7
Mkuma.7Author
Associate III
Mar 8, 2023 5:46 AM UTC

Is there any way to write 32 bytes in flash without affecting the other memory elements? Yes.

Can you tell me the command?

WojtekP1
Associate II
Mar 7, 2023 2:42 PM UTC

No you can not do it. You can erase sector. This is how every flash memory works.

With internal flash you can only write each 8 bytes once because there are error correcting code.

With external flash you may write many times the same place. Write basically turns ones to zeros, not otherwise (AND operation). This is very useful feature often.

Mkuma.7
Mkuma.7Author
Associate III
Mar 8, 2023 8:02 AM UTC

How to erase protected sectors? (When I tried to erase this warning was showed Protected sectors are not erased)

Mkuma.7
Mkuma.7Author
Associate III
Mar 14, 2023 10:47 AM UTC

How to erase protected sectors? (When I tried to erase this warning was showed Protected sectors are not erased)

Can anyone here help me with this?

Pavel A.
Mar 14, 2023 12:49 PM UTC

Protected sectors are called protected because they cannot be erased easily.

First, remove write protection from these sectors. The protected sectors are defined in the "option bytes". See the CubeProgrammer user manual for details.