Title: S32K344 + FS26: external watchdog during HSE FW installation by the SBAF Hello, We need to install the HSE firmware (FULL_MEM 0.2.55) in the field on S32K344 boards that use an FS26 SBC, without a debugger. Our software writes the pink image in code flash, sets IVT+0x2C to its address, programs the HSE FW feature flag in UTEST and triggers a destructive reset. The SBAF then installs the firmware. The FS26 runs a window watchdog (128 ms, challenger, reaction RSTB + FS0B). As far as we understand, the FS26 RSTB is connected to the MCU RESET_B, so after the destructive reset the FS26 goes back to INIT_FS and our software must close INIT_FS (first watchdog refresh) within the INIT_FS timeout (about 256 ms). While the SBAF installs the firmware, none of our code runs and nobody serves the FS26. In another thread NXP mentioned that the installation takes about 0.8-1 s, which is longer than the INIT_FS timeout. The attached diagram shows what we expect (A) and what we are afraid of (B): the FS26 resets the MCU during the installation, the SBAF starts again because the UTEST flag and the IVT pointer are still set, and the board ends up in a reset loop. Our questions: 1. Is this scenario real? Does the installation by the SBAF actually take longer than the FS26 INIT_FS timeout? 2. If the installation is interrupted by an external reset (RESET_B pulled low by the FS26), is it safe? Does the SBAF restart it from scratch at the next reset, or can the HSE be left partially installed? 3. What is the recommended way to install the HSE firmware on a board with an FS26 ? Installing with the FS26 in debug mode? Is there any other option, in the FS26 configuration or in the SBAF/IVT, so that the installation can complete in the field? (Diagram attached: FS26_HSE_install_timing.png. Times not to scale.) Thank you in advance. Best regards, Fabio Re: Title: S32K344 + FS26: external watchdog during HSE FW installation by the SBAF Hi @FabioG
1. The HSE firmware installation process can take approximately 1 second to complete. After the reset, the host application must wait until HSE_STATUS_INIT_OK is set before issuing any HSE service requests or proceeding with initialization.
2. Power instability, unexpected resets during HSE installation/update, failure to wait for HSE_STATUS_INIT_OK, execution of BIST before HSE_STATUS_INIT_OK is reached, or unsupported clock configurations may corrupt or erase the HSE FW.
Also it is recommended to use a functional reset rather than a power-on reset during the installation process and to ensure that the power supply remains stable throughout the operation.
3. Using the FS26 in Debug Mode is recommended during development and programming activities, as the watchdog can be configured to provide either an 8-second timeout window or an unlimited open window. This helps avoid automatic resets and reduces the risk of interrupting HSE operations.
BR, VaneB Re: Title: S32K344 + FS26: external watchdog during HSE FW installation by the SBAF Hi @VaneB I have another question: First start after the installation. After the SBAF has installed the HSE firmware, our bootloader starts and, during its normal start-up, performs a software functional reset to start the application, possibly before HSE_STATUS_INIT_OK is set. Is a functional reset at that moment safe, or is the installation still in progress until HSE_STATUS_INIT_OK is set for the first time? Fabio Re: Title: S32K344 + FS26: external watchdog during HSE FW installation by the SBAF Hi @FabioG
The BIST test should only be started after SBAF has entered the WFI state and the HSE_STATUS_INIT_OK bit is set.
Regarding the wait time for HSE_STATUS_INIT_OK to be asserted, there is no fixed time. The initialization time depends on several factors, including the core frequency and the HSE firmware version. Therefore, measuring the HSE boot time on your target platform is the best way to determine an appropriate timeout value.
Finally, it is not recommended to assume that a functional reset is safe before HSE_STATUS_INIT_OK is asserted. The HSE installation/initialization may still be in progress at that stage. As a result, the system should treat the startup process as incomplete until HSE_STATUS_INIT_OK is reached. Re: Title: S32K344 + FS26: external watchdog during HSE FW installation by the SBAF Hi VaneB, thank you for the answer. A short follow-up on the BIST point (2). Our software runs the BIST at every power-on, early in the start-up. Following your advice, on devices with the HSE firmware installed we could wait for HSE_STATUS_INIT_OK before starting the BIST. If HSE_STATUS_INIT_OK is not set within a short time (how much?), we would skip the BIST for that power cycle. Would this be enough to avoid any risk for the HSE firmware, or is there anything else we should take care of? Thank you. Best regards, Fabio
View full article