Hi @Gideon
1. Some debuggers protects the flash configuration field against unwanted modification to avoid locking of the device. If you want to changed the flash configuration field to a value different from default one, it's necessary to explicitly inform the debugger about this. Not sure about IAR, I do not have experience with this one, so please ask them directly.
2. AN5401 shows how to calculate the BOOT_MAC manualy. See example 4_secure_boot_add_BOOT_MAC_manual in the app note.
3. You should call the function 1x only. I can't see a reason to call it more times. Notice that there are two versions of the function. CSEC_DRV_GenerateMAC and CSEC_DRV_GenerateMACAddrMode. The second one will be much faster because the functin does not copy all the data to PRAM. But it works only for flash data, not for RAM. Please read the description in the S32K3 reference manual and also in SDK user manual.
Regards,
Lukas