To verify the contents of flash after programming, use the standard SWD Arm® CoreSight™ DAP protocol and read every address written and compare with the expected value.
Important: It is possible that the hex file being programmed will enable
access port (read-back) protection that will make it impossible to verify the
contents of flash. This protection will only take effect after a reset is applied.
Make sure not to reset between Writing
data and Verifying.