I am using the S32K314 MCU and the C40_Ip Driver (RTD Version: 5.0.0) to manage flash operations. The MCU has four Code Flash Memory Blocks, and I want to erase one entire block.
I understand from the Reference Manual that using the block erase operation (via the ESS bit in the MCR register) is restricted for factory use only, due to its reduced endurance (25 Program/Erase cycles). As such, I am using the C40_Ip_MainInterfaceSectorErase() function provided by the driver to erase individual sectors.

Here are my specific questions:
- Is it correct to erase an entire block by looping through its sectors and erasing them one by one using C40_Ip_MainInterfaceSectorErase()?
- Are there any best practices that exist to perform this operation ?
- Is there a specific example or reference implementation available for this scenario using the C40_Ip driver?