Most people dont even make the effort to create code comments so, no bug deal if there aren’t any but, its definitely a good habit to use comments and you wont get any discouraging comments from me regarding comments and i fully support people use them but, its not mandatory.
Over time you will learn to read through code and quickly track whats going on and what does what so, i understand it may be easier for some than others but again, being able to see the code with or without comments is really not something I would consider optional and should just be posted.
This goes back to the main theme ive my comments and posting code lol. I will help you and many others will too but, there’s gotta be code we can see inorder to clean it up.
Seeing the code is how we would diagnose a simple gpio conflict where you assigned a gpio connected to internal flash and is the cause of this issue and also keep in mind that there is very rarely a single problem that will have a single cause and a single solution. For many problems, there are potentially multiple things that can cause a single problem and thats again why posting more details is better than fewer details. It allows people to easily do a process of elimination and for example, i would first look at which gpio you are using and 100% know if it is an issue or not an issue and then i can move on to the next thing I want to check for potential issues.
Hopefully that makes sense for you.
Ya… You’ve definitely got a few lines of code there lol.
Is there an interval that its resetting or is it doing a boot loop that continuously reboots or is there a specific action that causes this?
Did you write all this code at once and do a single flash or did you make this over time by adding things incrementally? Whenever doing large or complex configs, its a good idea to add things and compile it in stages that way its easier to determine where the issue is coming from.
If you make a section, compile it and it all works fine then you move on to add more. After you add a new section and it causes issues or randomly reboots, then you can narrow the cause down to the last section you added to your configuration and it automatically eliminates a large %% of code that you dont need to scrutinize while searching for the root cause.
Does that make sense?
Can you post a copy of your log as it boots up?