Closed lightelf76 closed 5 years ago
Hi,
U-Boot can support WDT. You need to define:
U-Boot will call a macro to reset WDT every now and then.
Sincerely,
Yi-An Chen
=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
What I did so far: 1) Placed a line into /include/configs/nuc970_tomato.h
2) Placed a line into /configs/nuc970_tomato_defconfig CONFIG_HW_WATCHDOG=y As I can see from compiled binary and map-file - functions hw_watchdog_init/hw_watchdog_reset are compiled and present. But WDT reset still occured when I am in u-boot console.
Fixed at my end. See pull request for details
Hi,
Please add following setting to enable WDT. Thanks. setenv watchdog on
Sincerely,
Yi-An Chen
=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
Hi, nuc970_serial_getc wait a new symbol in busy loop and does not service WDT. Patch #13 fixes that issue.
Hi,
Isn’t tstc() called to check data availability before getc()?
Sincerely,
Yi-An Chen
=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
Hi, from other drivers (ns16550, lpuart) I see exactly same solution: busy wait with watchdog servicing. So not, tstc() not called
Hi,
This can be verified easily by sending some characters out to UART in NUC970’s tstc() function. I’m pretty sure it’s called repeatedly. U-Boot shell doesn’t block in NUC970’s getc().
Sincerely,
Yi-An Chen
=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
Hi,
Isn't it normal WDT not to reset CPU while everything's working fine?
I'm not seeing the an issue here. Or somehow I miss your point...
Sincerely,
Yi-An Chen
=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
The point is: If UART receives symbol, getc() returns and WDT reset did not occur (WDT serviced somewhere in other place). But when UBoot stays in console and no symbols entered, gets() cycles in busy loop and after ~14 seconds WDT resets board. So, getc() must service WDT internally or return error code EAGAIN.
Hi,
Yes, I’m seeing different implementations in serial driver getc(). Simply loop until there’s input (S3C24x0), add WDT reset(NS16550), or return -EAGAIN(STM32). I didn’t merge your pull request so far because me or my colleagues are unable to reproduce this issue (System reset by WDT if no console input).
Are you using NUC970’s default configuration? What hardware are you using, Nuvoton’s DEV board? Can you provide your u-boot.bin for us to verify this issue? Thanks.
Sincerely,
Yi-An Chen
=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
Hi,
We’re able to reproduce this issue with Tomato board’s config. Somehow the U-Boot behavior is different between two configurations. So WDT reset is working fine in DEV board’s config but not in Tomato board’s config.
I’ve merged your pull request. Thanks a lot for test and submit the patch.
Sincerely,
Yi-An Chen
=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
It seems like u-boot does not handle WDT, if it enabled by power-on strap. Tested with Tomato (rev.B chip) and nuc970_tomato_defconfig. What can be wrong?