According to the AN12283,the signed image inside the internal flash is like

that includes header, which includes version number.
In the UM11126, the manual states it just uses for during SB2 file loading.

I am working on a project that act as a secondary bootloader. I want to use the Secure_FW_version or NS_FW_Version as a monotonic counter for version checking because I don't want to waste flash size to make another CFPA-like page. I can't find the detail about how the image being validated during boot. Will it compare the image header's version number with the CFPA version number? Or it just validate the signature of the header?
