2023-10-04 01:10 AM
Hello,
I have seen that in the new version of STM32CubeProgrammer (v 2.14.0) there's a new API that can be used to program a flash using DFU bootloader (API which I didn't see in my previous STM32CubeProgrammer).In addition to the writeMemory() now we have the editSector() function. But the description (reported in the .chm file) is quite the same.
Anyone knows what's the difference between these two functions?
Thanks all
Solved! Go to Solution.
2023-10-16 06:56 AM
Hello @FValm.1 ,
I confirm the issue from my end and I have submitted an internal ticket to fix it.
Internal ticket number: 163902(This is an internal tracking number and is not accessible or usable by customers).
I'll keep you posted.
Sara.
2023-10-04 02:09 AM
Well, indeed It seems not implemented! Even if it is documented in the .chm file there is no prototype in the CubeProgrammer_API.h but you can see some evidence of that in CubeProgrammer_API.dll and in CubeProgrammer_API.lib... perhaps it will be available in following release?
2023-10-13 07:04 AM
Hello @FValm.1 ,
Thanks for your feedback,
The editSector() function performs the same job of the writeMemory() function while also ensuring that the size of the data being written does not surpass the sector size to avoid any potential exceptions.
This function is supported since v2.13.0.
Sara.
2023-10-13 08:33 AM
Sorry, it was my fault... I have seen my CubeProgrammer_API.h was not updated in my project.
So now I have tested the function substituting the following commented line with the equivalent with editSector():
//retval = writeMemory(puntflash->sectors[numsect].address, &FlashMirrorBuffer[offset], size);
retval = editSector(puntflash->sectors[numsect].address, &FlashMirrorBuffer[offset], size);
puntflash->sectors[numsect].address is 0x08000000
&FlashMirrorBuffer[offset] is the address of my buffer
size is exactly the sector dimension (0x1000 for my STM32G474RE configured in single bank)
the funtion returns with error -8. But if I change the size to 4095 it returns with no error. So it seems this function is not checking right the maximum size (or address boundary of the sector?). So actually I cannot write a whole sector as I would like to do...
2023-10-16 06:56 AM
Hello @FValm.1 ,
I confirm the issue from my end and I have submitted an internal ticket to fix it.
Internal ticket number: 163902(This is an internal tracking number and is not accessible or usable by customers).
I'll keep you posted.
Sara.