Skip to main content
JR.3
Associate II
March 4, 2022
Solved

It seems that erasing selected sectors does not work with B-U585I-IOT02A. If I read back flash, it is not 0xff filled. Full chip erase is OK. Is this known issue ?

  • March 4, 2022
  • 2 replies
  • 1309 views

..

This topic has been closed for replies.
Best answer by JR.3

I found that I had SWAP_BANK set at option bytes. After I cleared that bit, selected sectors were erased. So, this was my mistake, CubeProgrammer is OK.

2 replies

JR.3
JR.3Author
Associate II
March 9, 2022

I tried latest CubeProgrammer (2.10.0) and it did not work either. I had version 2.9.0 earlier. Logs:

11:31:09:200 : r ap 0 @0x40022040 0x00000004 bytes Data 0x1CFFF8AA

11:31:09:200 : r ap 0 @0x0BF99EFE 0x00000004 bytes Data 0x00880092

11:31:09:212 : Flash sector erase ... 

11:31:09:212 : Flash erase...

11:31:09:213 : r ap 0 @0x40022040 0x00000004 bytes Data 0x1CFFF8AA

11:31:09:213 : r ap 0 @0x40022040 0x00000004 bytes Data 0x1CFFF8AA

11:31:09:214 : r ap 0 @0x40022040 0x00000004 bytes Data 0x1CFFF8AA

11:31:09:214 : r ap 0 @0x40022020 0x00000004 bytes Data 0x00000001

11:31:09:215 : r ap 0 @0x46020800 0x00000004 bytes Data 0x00000000

11:31:09:215 : w ap 0 @0x46020800 0x00000004 bytes Data 0x00000200

11:31:09:215 : r ap 0 @0x46020800 0x00000004 bytes Data 0x00000000

11:31:09:217 : w ap 0 @0x46020800 0x00000004 bytes Data 0x00000000

11:31:09:217 : r ap 0 @0x40030400 0x00000004 bytes Data 0x00000004

11:31:09:219 : w ap 0 @0x40030400 0x00000004 bytes Data 0x00000004

11:31:09:222 : r ap 0 @0x40022028 0x00000004 bytes Data 0x43000018

11:31:09:223 : r ap 0 @0x40022028 0x00000004 bytes Data 0x43000018

11:31:09:225 : w ap 0 @0x40022028 0x00000004 bytes Data 0x43000018

11:31:09:226 : r ap 0 @0x40022020 0x00000004 bytes Data 0x00000001

11:31:09:234 : w ap 0 @0x40022020 0x00000004 bytes Data 0x000000FB

11:31:09:235 : r ap 0 @0x40022020 0x00000004 bytes Data 0x00000000

11:31:09:237 : r ap 0 @0x40022028 0x00000004 bytes Data 0x43000018

11:31:09:237 : w ap 0 @0x40022028 0x00000004 bytes Data 0x4300001A

11:31:09:239 : r ap 0 @0x40022040 0x00000004 bytes Data 0x1CFFF8AA

11:31:09:240 : r ap 0 @0x40022028 0x00000004 bytes Data 0x4300001A

11:31:09:240 : w ap 0 @0x40022028 0x00000004 bytes Data 0x4300001A

11:31:09:241 : r ap 0 @0x40022028 0x00000004 bytes Data 0x4300001A

11:31:09:241 : w ap 0 @0x40022028 0x00000004 bytes Data 0x43000002

11:31:09:241 : r ap 0 @0x40022028 0x00000004 bytes Data 0x43000002

11:31:09:242 : w ap 0 @0x40022028 0x00000004 bytes Data 0x43000002

11:31:09:243 : r ap 0 @0x40022028 0x00000004 bytes Data 0x43000002

11:31:09:243 : w ap 0 @0x40022028 0x00000004 bytes Data 0x43010002

11:31:09:244 : r ap 0 @0x40022020 0x00000004 bytes Data 0x00010000

11:31:09:245 : r ap 0 @0x40022020 0x00000004 bytes Data 0x00010000

11:31:09:246 : r ap 0 @0x40022020 0x00000004 bytes Data 0x00000001

11:31:09:246 : r ap 0 @0x40022028 0x00000004 bytes Data 0x43000002

11:31:09:246 : w ap 0 @0x40022028 0x00000004 bytes Data 0x43000000

11:31:09:247 : r ap 0 @0x40022028 0x00000004 bytes Data 0x43000000

11:31:09:247 : w ap 0 @0x40022028 0x00000004 bytes Data 0x43000000

11:31:09:248 : r ap 0 @0x40022020 0x00000004 bytes Data 0x00000001

11:31:09:248 : Existing specified sectors are erased successfully Protected sectors are not erased

11:31:09:270 : r ap 0 @0x40022040 0x00000004 bytes Data 0x1CFFF8AA

11:31:09:270 : r ap 0 @0x0BF99EFE 0x00000004 bytes Data 0x00880092

11:31:10:231 : r ap 0 @0x40022040 0x00000004 bytes Data 0x1CFFF8AA

11:31:10:239 : r ap 0 @0x0BF99EFE 0x00000004 bytes Data 0x00880092

11:31:11:249 : r ap 0 @0x40022040 0x00000004 bytes Data 0x1CFFF8AA

11:31:11:256 : r ap 0 @0x0BF99EFE 0x00000004 bytes Data 0x00880092

11:31:12:281 : r ap 0 @0x40022040 0x00000004 bytes Data 0x1CFFF8AA

JR.3
JR.3AuthorBest answer
Associate II
March 11, 2022

I found that I had SWAP_BANK set at option bytes. After I cleared that bit, selected sectors were erased. So, this was my mistake, CubeProgrammer is OK.

Amel NASRI
Technical Moderator
March 11, 2022

Thanks @JR.3​ for sharing the status and the root cause of your issue.

Glad to know that it is fixed.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.