I have a Digi ConnectCore6 SBC, which uses the DA9063 PMIC. I have successfully set up Linux kernel and watchdog daemon to use the DA9063 watchdog. However, the DA9063 powers off instead of resetting the DA9063.
我的建议
https://support.dialog-semiconductor.com/forums/post/pmic-audio-and-hapt...
but no change. One time I observed that the DA9063 watchdog did reset as expected, but during next boot the PMIC powered down.
Any advice?
The registers values after a power cycle are attached, which probably are the registers loaded from OTP (assuming u-boot doesn't change any of them).
I experience the same behaviour when enabling the watchdog from by setting register 0x11 to 0x02.
Device:
Hello,
Could you post the full .ini file you are using?
I take it, you are triggering the watchdog via I2C and not hardware?
You will need to put it in a folder and zip it.
Kind regards,
Elliott
Hi Elliot,
I am a consumer and have a off-the-shelf SBC from Digi,https://www.digi.com/products/embedded-systems/single-board-computers/connectcore-6-sbc.
The linux da9063-watchdog driver is triggering the watchdog via i2c, and I observed that the PMIC powered down. So to debug, I enabled the watchdog by setting TWDSCALE directly in uboot, by writing 0x2 to 0x11 register (CONTROL_D). After 4 seconds the watchdog timeouts and should assert TWD_ERROR. Now I expected that the PMIC would power down to RESET mode and power up again, but I observe that the PMIC powers down. I assume that there are one or more register settings that aren't configured correctly.
我认为看门狗应该是0.我试图将reset_duration增加到500ms,以确保在再次上电之前放电,但没有变化。
Hello,
Could you perform a full register dump?
I take it the PMIC power downs and remains powerdown?
Could you measure VDDCORE?
kind regards,
Elliott
>你能做一个完整的register dump?
Register dump attached to the original post
>我把它带到了PMIC电源,仍然是powerdown?
Yes
> Could you measure VDDCORE?
我会尽快完成。在我进行测量的同时,您可以查看寄存器吗?由于PMIC安装在由穿孔金属盒盖上的SOM上,因此可能很困难。我可以测量我认为是VDDCORE的DC-DC降压转换器的电压。
Hello,
I will review the registers, but i am not sure that it is a full register dump.
我需要从OTP搜索。潜在的,未设置autoboot,因此PMIC正在等待唤醒事件。
On the VDDCORE, this voltage will tell us what state the PMIC is in: RESET, ACTIVE, RTC...etc. it is not connect to the bucks, this is the referance for the internal core voltage.
> I will review the registers, but i am not sure that it is a full register dump.
I can only get the registers that u-boot can read. I got all registers documented in the datasheet exept for 0x1A8 (PMIC_STATUS).
>我需要从OTP搜索。潜在的,未设置autoboot,因此PMIC正在等待唤醒事件。
> On the VDDCORE, this voltage will tell us what state the PMIC is in: RESET, ACTIVE, RTC...etc. it is not connect to the bucks, this is the referance for the internal core voltage.
You are right. The equipment I have available right now isn't sensitive enough to measure the current drawn in the POWER-DOWN, RESET, or RTC modes. I think the PMIC powers down to RESET and up to POWER-DOWN and then waits for a wakeup event. It should continue powering up if AUTO_BOOT is asserted.
I found that asserting AUTO_BOOT or asserting TICK_ON (RTC will periodically generate a RTC Tick wakeup event) the PMIC is powered up to ACTIVE mode if watchdog times out or the SHUTDOWN register is asserted within the first ~15 seconds after resetting the PMIC. If watchdog times out after ~15 seconds, the PMIC doesn't enter ACTIVE mode. I assume it stays in POWER-DOWN mode waiting for a wakeup event.
Further investigation gave interesting results. If AUTO_BOOT or TICK_ON is asserted and the EVENT_A registers are cleared by writing back the read value. Then by asserting SHUTDOWN register within ~15 seconds the PMIC always powers up from RESET mode to ACTIVE mode. Asserting SHUTDOWN later than ~15 seconds, it does not. Same behavior for the watchdog.
Am I missing a register setting, or is this a bug?
Hello,
So to see if which state the device is in, we do not need to meaure the current, just the volatge. VDDCORE: 0V:RTC Mode or power supply issue, 2.2V: RESET, 2.5V:Active or higher state, 2.5V+ damage core.
I think this is down to the configuration of the OTP. If you can see the device, please read me the markings.
Kind regards.
Elliott
Hello,
I so believe i have the OTP you are using, and it looks like Autoboot is not set. So when the watchdog times out the device will not start back-up without a wake-up.
I didnt quite understand what you meant by the asserting nSHUTDOWN after 15 seconds. So if you make the chages via I2C, then hit nSHUTDOWN inside of 15 seconds its starts back up and after 15 seconds is waits for a wake-up?
Kind regards,
Elliott
Sorry for being unclear. In u-boot I asserted the SHUTDOWN register (0x13 bit 1) to power down the PMIC to reset, since the watchdog also power down the PMIC to reset. When PMIC reaches RESET mode, it reads the OTP registers and enters POWER-DOWN mode. Since AUTO_BOOT is not set, as you say, the PMIC need a wake-up event to continue powering up. By enabling RTC tick, the PMIC powers up to ACTIVE DOMAIN after setting the SHUTDOWN register. The PMIC does not power up if SHUTDOWN is set later than 16 seconds since last time the the EVENT_A registers was cleared if RTC tick interval is 1 second.
By enabling the RTC tick, the watchdog works. But sometimes the system doesn't boot. The GPIO7 is used to control a LED, which is lit when power is OK according to Digi documentation. The LED is not lit, and I have measured some voltages when in this state. The PMIC V_SYS supply voltage is 5V, and VDDCORE is 2.5V. It is not possible to wake up the system by giving the PMIC a ONKEY wakeup event.
The markings on the PMIC is:
DA9063, 56, 1817ECAA
Hello,
I have managed to replicate what you see.
I start up the device, i can then cause a shutdown event via the nSHUTDOWN register, the device goes through a reset and into POWERDOWN and waits for a wake-up event. I then have TICK_WAKE set to 1 and TICK_TYPE set to 1, this should cause a wake-up event on a minute tick(on the minute not on the second in which the TICK_ON is asserted), i then set TICK_ON. When the minute expires, the device boots.
The device now has the TICK bit set in the events page. So, when you trigger a shutdown, the device goes through the reset and reaches powerdown, however the wake-up TICK has already been set, so the device boots again as this is its wake-up event.
However, if you clear the IRQs before causing the next shutdown the device will wait in powerdown for next TICK event before booting back up. Due to TICK_WAKE being set for a minute, you have to wait for 1 minute to expire, however this function works on the minute currently in the RTC. So when the device reaches powerdown, the RTC could be on 30s, when the device reaches the minute from this point it will start back up. So you have a wait time of between 1- 59 seconds.
Kind regards,
Elliott
This is correct. This is a workaround for enabling the watchdog functionality for a PMIC where AUTO_BOOT is not set in OTP, since OTP registers are read when going from RESET mode to POWER-DOWN. TICK_WAKE and TICK_TYPE are not read from OTP. Unfortunately, this doesn't always work. At least, not for my SBC when the watchdog times out. Not clear for me whether it is an issue with DA9063 or the SBC.
Note that, if you set TICK_WAKE to 0 (tick every second) and wait more than 16 seconds before setting SHUTDOWN register, the PMIC doesn't react to the RTC wake-up event. This must be a DA9063 issue.
Hello,
Ok, i was testing the set-up in 1 minute mode. I have retested in 1s and i can replicate what you are seeing, clearing the IRQ triggers the start-up after it gets stuck in PD.
I need to investigate this further.
Kind regards,
Elliott
Hello,
Sorry for the delay. So we do not think this is an issue with the PMIC. The device not autobooting after 16s is the correct operation of the device, the 16s is related to the VDD_START protection. The reason why the device would appear to autoboot initnally is that the device has not had time to complete it certain opertions before the shutdown has been toggled.
我需要更多地挖掘更多,看看我可以分享哪些其他信息。
Kind regards,
Elliott
谢谢您的帮助!
结论如果在OTP中未设置Autoboot,则无法使用DA9032看门狗。
然而,它是可能使监管机构。When the watchdog timer elapses, the DA9063 powers down to RESET mode and then powering up to POWER-DOWN mode, where it, since AUTOBOOT is not set, waits forever for a wake-up event.
Hello,
I will need to look deeper to see if there is another method.
It seems in this situation where there is limited/no access to nONKEY and the other wake-up function, then using the watchdog might not be the best approach.
在此OTP GPIO5和GPIO6上有一个与GPIO状态相关的唤醒事件。
Kind regards,
Elliott