cancel
Showing results for 
Search instead for 
Did you mean: 

STM Cube Programmer shows "Sector xxxxx does not exist" after sector erase.

GhostSherry
Associate II

Hey there!

I am currently working on a custom CAN IAP bootloader, using the STLink V3/SET as a USB to CAN bridge for programming FLASH. I am following the AN3154 doc for CAN protocol used in the STM32 bootloader and I am currently doing the erase command. I have been able to do the mass erase function, as well as sector erase functions.

However, on some occasions (mostly after a just concluded sector erase command, where I erase multiple sectors at a go), STM Cube programmer displays "sector xxxxx does not exist" and sends the wrong sectors (see image), and my code responds as it should by sending a decline byte. I usually have to either reset the device/perform another operation before I return again to conduct a sector erase, this also does not occur with a full chip erase (only erases Application layer). I shall use the images below to buttress my point.

Image 1- shows the first operation where I try to erase 10 sectors, and as shown it is successful (I have filled memory and tested and seen that it erases)

Image 2- figure two is where I try to erase the same sectors as before, and it sends the error. As you can see, the cube programmer is sending message 0x00 0x00 0x00.... and I respond with a decline byte because I restricted this sectors from being erased in the code, i.e sectors 1-19, are not part of the sectors you can erase, it will always return a NACK byte.

Image 3- shows me trying to erase another 8 sectors where the error pops up as "sectors do not exist"

Image 4- in image 4, you can see the cube programmer sending some sectors right, and sends the last three sectors as 0x00 0x00 0x00.

I don't seem to understand why this is so, I am suspecting it is a bug in the cube programmer, as I have no influence on the messages it sends, it sends messages, I respond from my end and if it is correct, it moves on. I do not have access to change what messages it sends.

0 REPLIES 0