SmartPower3 being reset

Post Reply
vaisakh
Posts: 4
Joined: Wed Oct 25, 2023 6:50 pm
languages_spoken: english
ODROIDs: XU4, N2Plus, SmartPower3
Has thanked: 0
Been thanked: 0
Contact:

SmartPower3 being reset

Post by vaisakh »

Hello,

I have flashed my SmartPower3 power monitor with "2023/May/18(v2.2)" firmware as listed in SmartPower3 wiki page.
Usually I connected to the SmartPower3 unit via Putty or Mobicom Serial port options or Python serial_asyncio and almost the functionality seems to be working.

Except for the disconnection part i.e. when the port is closed from PC irrespective of whether it is Putty or Mobicom or Python code, the SmartPower3 is getting reseted and it does a power OFF-ON Cycle and there by resetting the connected device like XU4. This creates problem of power loss & device reboot and loosing out all the settings and work.

Anyone faced similar issue? If so, how it can be resolved by avoiding the power cycle of SmartPower3 unit whenever UART connection is closed.

User avatar
mctom
Posts: 3528
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polski
ODROIDs: XU4, M1, H3+, SP3, N2L, M1S
Location: Gdańsk, Poland
Has thanked: 499 times
Been thanked: 674 times
Contact:

Re: SmartPower3 being reset

Post by mctom »

Hi,

So is this implied that previous versions of SP3 firmware did not have this issue?
Are you able to determine what was the previous firmware version that you have been using?

There were some major changes in serial communication code, so indeed something could have been broken in the process.
Punk ain't no religious cult, punk means thinking for yourself!
OpenUPS
PiStackMon

vaisakh
Posts: 4
Joined: Wed Oct 25, 2023 6:50 pm
languages_spoken: english
ODROIDs: XU4, N2Plus, SmartPower3
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower3 being reset

Post by vaisakh »

Unfortunately, I didn't test extensively in the older version firmware. :P
Right after unboxing, I just made sure the XU4 board and SmartPower3 were working - didn't pay attention this issue at that time, just went on to upgrade the firmware instead as noted in the wiki. :)
mctom wrote:
Wed Oct 25, 2023 7:21 pm
Hi,

So is this implied that previous versions of SP3 firmware did not have this issue?
Are you able to determine what was the previous firmware version that you have been using?

There were some major changes in serial communication code, so indeed something could have been broken in the process.

User avatar
mctom
Posts: 3528
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polski
ODROIDs: XU4, M1, H3+, SP3, N2L, M1S
Location: Gdańsk, Poland
Has thanked: 499 times
Been thanked: 674 times
Contact:

Re: SmartPower3 being reset

Post by mctom »

Ah, so this is inconclusive.

In serial links such as RS-232 or UART there is no concept of "session" or "connection", and "closing the connection" should be literally undetectable by the SP3.
I suspect your serial clients (such as PuTTY) send something nasty when you close them. Are you able to run PuTTY and see what it sends somehow? Like a loopback test?
Punk ain't no religious cult, punk means thinking for yourself!
OpenUPS
PiStackMon

vaisakh
Posts: 4
Joined: Wed Oct 25, 2023 6:50 pm
languages_spoken: english
ODROIDs: XU4, N2Plus, SmartPower3
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower3 being reset

Post by vaisakh »

Sure, I will try getting a loop-back connector to test this out.

If indeed the serial client (Putty or Mobicom) is the issue, it should not ideally show up for the python example code (i.e https://github.com/hardkernel/smartpowe ... ial2png.py) which uses serial_asyncio package?

Apparently, the issue pops up for the sample code provided in Github for SmartPower interfacing as well . After the connection is established, when the loop is interrupt with Ctrl+C, the same issue is replicated for me.

I feel, the issue may be persistent across any and all connection methods irrespective of serial client or the package I may use.

User avatar
odroid
Site Admin
Posts: 41864
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3433 times
Been thanked: 1920 times
Contact:

Re: SmartPower3 being reset

Post by odroid »

My Ubuntu PC couldn't reproduce the issue. I'm using the latest firmware 18-May version on my SmartPower3.
I've used minicom as a terminal program and I opened and closed the program several times to reproduce the issue.

BTW, do you use Windows OS?
It might be worth to try the latest CP2102 driver.
https://www.silabs.com/developers/usb-t ... =downloads

vaisakh
Posts: 4
Joined: Wed Oct 25, 2023 6:50 pm
languages_spoken: english
ODROIDs: XU4, N2Plus, SmartPower3
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower3 being reset

Post by vaisakh »

Hello,

I tried the same from my Ubuntu installation with minicom as you mentioned.
The issue is reproducible - I am attaching a video of the issue wherein
- a minicom instance is opened with the USB/TTY instance
- after which the terminal instance is closed
- You can see the power monitor reset occurring after a gap of second or two.

Regards,
Vaisakh
odroid wrote:
Thu Oct 26, 2023 9:40 am
My Ubuntu PC couldn't reproduce the issue. I'm using the latest firmware 18-May version on my SmartPower3.
I've used minicom as a terminal program and I opened and closed the program several times to reproduce the issue.

BTW, do you use Windows OS?
It might be worth to try the latest CP2102 driver.
https://www.silabs.com/developers/usb-t ... =downloads
Attachments
Screen with firmware info
Screen with firmware info
20231027_054743.jpg (75.82 KiB) Viewed 446 times
doc_2023-10-27_05-57-26.zip
Video of issue reproduction in Linux/Minicom
(5.42 MiB) Downloaded 8 times

User avatar
odroid
Site Admin
Posts: 41864
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3433 times
Been thanked: 1920 times
Contact:

Re: SmartPower3 being reset

Post by odroid »

Thank you for the video and it was quite helpful to understand.

If I suddenly closed the whole terminal by pressing 'x' on the top-right corner, I could reproduce the issue as you did.
If I gracefully closed the minicom by pressing "Ctrl-A" - "Z" - "X" keys sequentially as I did usually, the SmartPower3 didn't reset.

I guess the CPU reset appears when the DTR/RTS signal toggling happens if a serial monitor program closes suddenly.
Check the SmartPower3 PCB full schematics page #3 in this link.
https://wiki.odroid.com/accessory/power ... data_sheet
Note that DTR/RTS signals are used for entering into firmware update mode of the ESP32 module.

Therefore, you have to close the serial monitoring software gracefully or remove the Q3 transistor from the PCB until you need another firmware upgrade or recovery.
These users thanked the author odroid for the post:
mctom (Fri Oct 27, 2023 3:34 pm)

Post Reply

Return to “Smart Power”

Who is online

Users browsing this forum: No registered users and 1 guest