2020-09-25 09:47 AM
ST-LINK Utility has checksum calculation for both internal and external memory programming.
But STM32CubeProgrammer has checksum for only external memory programming.
We have used ST-LINK/V2 + ST-LINK Utility until now, but we are considering to update our programmer to ST-LINK/V3 + STM32 Cube Programmer.
Is there any easy way to verify the programming for internal flash(like ST-LINK Utility's checksum function) in STM32CubeProgrammer?
Or is there a reason that we don't need checksum calculation for internal memory programming? (Using STM's CRC function instead, etc...)
Our device is STM32L4.
Regards,
2020-09-25 10:33 AM
> Is there any easy way to verify the programming for internal flash(like ST-LINK Utility's checksum function) in STM32CubeProgrammer?
There is a "verify programming" checkbox that will verify the contents after they are written. ST-Link utility has the same functionality.
2020-09-25 01:08 PM
The main advantage of CRC check after programming is time: A complete readout of a large external memory may take several minutes, almost doubling the already long overall programming time. That's mainly due to the time required to transfer a huge amount of data via JTAG/SWD and USB to the host. In contrast, internal CRC calculation (whether internal or external memory is involved) is pretty fast.
As the internal flash is quite limited is size (even nowadays at most 2 MBytes), for this type of flash the benefit of internal CRC computation over full readout isn't that big, so it's nice to have it but ...
Whether CRC is done in software or in hardware doesn't really matter in this respect, as the hardware CRC unit can be used for external memory as well.
2020-09-25 10:07 PM
Thanks for kind answers.
Now I understand ,verify is enough to confirm whether programming is successful, and CRC is most useful for external memory.
And I found background explanation was not enough.
We ask our factory to write binary file on blank STM32L4 internal flash ,hand over the binary file to factory staff ,and tell checksum when we wrote same binary file.
Factory staff writes our binary file to blank STM32L4 and confirm if checksum is same value as we told.
Our factory handles many products(many binary files) and need to be careful not to make mistakes.
We think checksum is useful way to confirm if factory write correct file, correct version.
Is there any useful way to do that in ST-LINK/V3 + STM32 Cube Programmer?
Regards,
2020-09-26 01:00 AM
Ah, that's a different purpose. In this case it might be better to incoprorate this into the final production test of the whole board/device, i.e. mcu performs some self-checks, drives actuators (if any), calculates CRC by itself and displays it in some way. If your device does not have any display or UART port etc. then debug port is the only means, of course. The self-test routine could write the results to some fixed RAM locations which could then be retrieved by debug adapter.
If you don't want to sacrifice flash for this final tesl, one could write this routine to RAM and start it via debugger. I don't think CubeProgrammer can do this "out of the box" but one could employ the external loader infrastructure for that. I.e. invent a small fake external memory and the external loader (test routine!) will be uploaded to target's RAM, executed there, and the results could be returned as memory contents of this fake memory. Hopefully CubeProgrammer is not "smart" enough to allow external loaders only for certain fixed address ranges like FMC, QSPI ...
2020-09-27 05:09 PM
>Andreas Bolsh
Thanks for kind reply again.
Our device has UART port, we'll try self check result display on UART or debug port.
Now I understand that self check is needed instead of ST-LINK UTILITY's checksum function.
We think checksum on ST-LINK UTILITY is useful function, and it is sad that STM32CubeProg doesn't have that no more.
Regards,
2020-12-04 04:41 PM
Same problem with you and i want the same answer as what you are expecting. Until now, i am still looking and finding solution on how to get the checksum
2021-10-01 04:35 AM
Well this is another case where the new application versions that it is supposed to improve previous ones are not. I personally prefer visual programmer than stm32cubeProgrammer but I can not use it with STM32G4 family. Yes it is sad.