Pyportal Titano auto reboot

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
thesassyindian
 
Posts: 7
Joined: Sat Sep 04, 2021 3:14 am

Pyportal Titano auto reboot

Post by thesassyindian »

Hello folks,
Is there a good way to reboot the Titano through software?

My code that pulls in a JSON from a URL, parses it and displays values on the LCD hangs after every few hours of running.

Right now, I have a GPIO wired to the RESET button, and I toggle it every hour to reboot.
Is there a cleaner way to do this?

Thanks!

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Pyportal Titano auto reboot

Post by dastels »

I would want to figure out why it's hanging. Is there a memory leak? Is it a Wifi issue that isn't being handled? It could be one of many things. If the time to lockup is fairly consistent I'd start suspecting a memory issue.

Are you using CircuitPython or C++ (aka Arduino)?

Dave

User avatar
thesassyindian
 
Posts: 7
Joined: Sat Sep 04, 2021 3:14 am

Re: Pyportal Titano auto reboot

Post by thesassyindian »

I’m using Arduino.

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Pyportal Titano auto reboot

Post by dastels »

C++ means more potential for memory problems. Can you post your code?

Dave

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Pyportal Titano auto reboot

Post by dastels »

As a brute force approach you might be able to do something with a TPL5111 using https://www.adafruit.com/product/3573 with the ENout connected to the PyPortal's reset pin which is available at the SWD connector pads.

Dave

User avatar
thesassyindian
 
Posts: 7
Joined: Sat Sep 04, 2021 3:14 am

Re: Pyportal Titano auto reboot

Post by thesassyindian »

There’s absolutely no need for external hardware!
I just pull a GPIO pin low every hour (using NTP time) that’s connected to the pyportal’s RESET button.

Once the MCU turns off, that gpio is pulled high internally.

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Pyportal Titano auto reboot

Post by dastels »

Ok then, that cool. Back you my first comment: find and fix the problem.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”