Skip to main content
Mkuma.7
Associate III
February 17, 2023
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
February 20, 2023

no

17 replies

KnarfB
Super User
February 17, 2023

What chip exactly?

Mkuma.7
Mkuma.7Author
Associate III
February 20, 2023

STM32WB55VGY6TR

MM..1
Super User
February 17, 2023

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
February 20, 2023

Is there any way to erase 32bytes in flash?

MM..1
MM..1Best answer
Super User
February 20, 2023

no

Mkuma.7
Mkuma.7Author
Associate III
February 21, 2023

ok thank you

Mkuma.7
Mkuma.7Author
Associate III
March 7, 2023

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

Pavel A.
March 7, 2023

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
March 8, 2023

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
March 7, 2023

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
March 8, 2023

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
March 14, 2023

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.
March 14, 2023

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.