How to set the watchdog timer for Apalis i.MX8X?

  1. How does one configure U-boot watchdog on the Apalis i.MX8X?

  2. Is there a defconfig option to configure u-boot watchdog and set the watchdog time in u-boot?

  3. If a mw is required, what is the watchdog address and mw commands required set the watchdog for the Apalis i.MX8X?

Hello @tlsmith3777 ,

Greetings!

This article is a good place to get started with everything, Watchdog-related. Have you already had a look there?

BR, Janani

And I am able to configure WD for the kernel. But need to configure specifically for uboot.

Hi @tlsmith3777

Why do you want to enable Watchdog for U-Boot? The SoM will not stay in U-Boot longer than 1s.

Best regards,
Jaski

Hi Jaski,

the reason is that a hang due to hardware or some other reason can occur as u-boot boots and also within that 1 second. So, setting a WDT timer to 6 seconds allows us to know if a hang has occurred and will do a reset if the system hangs.

After speaking with NXP, it sounds like the external SCFW API’s have to be exported to U-boot. Has Toradex provided or exported the NXP SCFW APIs to any customers on any of your platforms? The SCFW API u-boot client source is imx-scfw-porting-kit-1.9.0/src/scfw_export_uboot.tar.

Ideally I would simply like to write to the WDT CS registers and configure it from u-boot, but NXP says access to the WDT CS register is only through the SCFW APIs like sc_timer_set_wdog_timeout() and sc_timer_start_wdog(). And only then after I export the API to u-boot.

Hi

Actually when it comes to the SCFW, then you need to follow the documentation of NXP and we never provided any custom SCFW for the customer. I can put a feature request regarding Watchdog in U-Boot to our Software Team and let you know if this feature will be implemented.

Best regards,
Jaski

Hi Tracy

I asked for the feature request and I will let you know for the outcome soon.

Either way, six seconds is enough time to catch a hang during boot.

This is also true. So you might not need support of watchdog in U-Boot.

Best regards,
Jaski

Hi Tracy

I talked to the Software Team and we will not implement the support for Watchdog in U-Boot. I am sorry to not provide you any positive feedback.

Best regards,
Jaski

Ok, which value for timeout did you set now?

No, I meant, which value do you set now in Linux Kernel Environment, since there is no support for WDT in U-Boot?

Hi Tracy

Thanks very much for the well detailed information. As already explained, we won’t patch this in U-Boot.

The five seconds is long enough for the kernel to come up and deal with network issues. But realize if the kernel doesn’t come up due to a hang before the WDT is configured by the kernel, the WDT never is enabled and it will hang indefinitely.

The kernel should not hang before you will valid the kernel through testing. If there is a hardware error, then you cannot catch anything since the system will be keep resetting.

Best regards,
Jaski

I’ll need to work this through our marketing representative. The WDT isn’t being enabled or configured by the SCFW. NXP claims the SCFW WDT is supported by all execution environments according to their porting guide. This is clearly not the case. This appears to be a defect. Even if we ported the SCFW WDT API it would not work. This is a defect and requires a fix. Thanks for your assistance.

I am sorry but we are not customizing SCFW for customers. You need to do this by yourself. Please follow the NXP Guide.

Best regards,
Jaski

Thanks for the feedback. Sorry but this is not a customized SCFW request. This is fix for a non functional WDT that NXP documentation claims should function in all execution environments. This is a Toradex porting issue and a NXP bug that Toradex needs to fix for all customers using Apalis IMX8QXP or any NXP IMX8X architecture. The bug exists in the latest code as well.

Hi Tracy

I got your point as I know this was also discussed with NXP but at the end there is currently no solution.
I am really sorry for this.

Best regards,
Jaski

Closing this. thanks

You are welcome. Thanks.

See the following to customize the WDT SCFW to enable the virtual WDT when the SCFW WDT API is not available in U-boot.

Thanks very much for your post.