peacemaker Expert Licensed User Longtime User Sep 17, 2021 #1 HI, All Who uses an external watchdog solutions for MCU boards (for very important projects)? Any recommendation what a ready-to-use board you use ? For me best solution, i guess, just reset impulse generator, 1 minute period.
HI, All Who uses an external watchdog solutions for MCU boards (for very important projects)? Any recommendation what a ready-to-use board you use ? For me best solution, i guess, just reset impulse generator, 1 minute period.
tigrot Well-Known Member Licensed User Longtime User Sep 30, 2021 #2 peacemaker said: HI, All Who uses an external watchdog solutions for MCU boards (for very important projects)? Any recommendation what a ready-to-use board you use ? For me best solution, i guess, just reset impulse generator, 1 minute period. Click to expand... Hi, you can use a watchdog chip, there are many you can mount on a board in minutes . Upvote 0
peacemaker said: HI, All Who uses an external watchdog solutions for MCU boards (for very important projects)? Any recommendation what a ready-to-use board you use ? For me best solution, i guess, just reset impulse generator, 1 minute period. Click to expand... Hi, you can use a watchdog chip, there are many you can mount on a board in minutes .
peacemaker Expert Licensed User Longtime User Sep 30, 2021 #3 Yes, i have asked indeed for real examples, maybe ready board to order. But found the chips named like "supervisor". But the main reason of hangs was anyway in the code, if more sharp - the stack size not enough. Upvote 0
Yes, i have asked indeed for real examples, maybe ready board to order. But found the chips named like "supervisor". But the main reason of hangs was anyway in the code, if more sharp - the stack size not enough.
tigrot Well-Known Member Licensed User Longtime User Sep 30, 2021 #4 Stack is a real issue. I have a FW handling lot of strings, so string operations consume memory very quickly. Upvote 0
Stack is a real issue. I have a FW handling lot of strings, so string operations consume memory very quickly.
tigrot Well-Known Member Licensed User Longtime User Sep 30, 2021 #5 Yes, they are called supervisor. € 1 each, more or less. Upvote 0
C candide Active Member Licensed User Longtime User Sep 30, 2021 #6 a way to avoid stack issue is to make string operations in dedicated small sub each time it is needed because at end of sub, all array and string are released on stack. Upvote 0
a way to avoid stack issue is to make string operations in dedicated small sub each time it is needed because at end of sub, all array and string are released on stack.
peacemaker Expert Licensed User Longtime User Oct 1, 2021 #7 HTTP JSON requests can be rather huge, and if there are several such requests - it's lots of subs calling each other... And any adding to JSON may lead again to trouble. Upvote 0
HTTP JSON requests can be rather huge, and if there are several such requests - it's lots of subs calling each other... And any adding to JSON may lead again to trouble.
tigrot Well-Known Member Licensed User Longtime User Oct 1, 2021 #8 candide said: a way to avoid stack issue is to make string operations in dedicated small sub each time it is needed because at end of sub, all array and string are released on stack. Click to expand... That's what I did in my FW. Upvote 0
candide said: a way to avoid stack issue is to make string operations in dedicated small sub each time it is needed because at end of sub, all array and string are released on stack. Click to expand... That's what I did in my FW.
peacemaker Expert Licensed User Longtime User Oct 1, 2021 #9 tigrot said: what I did in my FW Click to expand... Maybe exact example ? Replace important code by "'my code..." Upvote 0
tigrot said: what I did in my FW Click to expand... Maybe exact example ? Replace important code by "'my code..."
tigrot Well-Known Member Licensed User Longtime User Oct 1, 2021 #10 peacemaker said: HTTP JSON requests can be rather huge, and if there are several such requests - it's lots of subs calling each other... And any adding to JSON may lead again to trouble. Click to expand... Split each request into smaller answers. Add an index in request : 1, for first part, 2, for second... Upvote 0
peacemaker said: HTTP JSON requests can be rather huge, and if there are several such requests - it's lots of subs calling each other... And any adding to JSON may lead again to trouble. Click to expand... Split each request into smaller answers. Add an index in request : 1, for first part, 2, for second...
peacemaker Expert Licensed User Longtime User Oct 1, 2021 #11 tigrot said: Split each request into smaller answer Click to expand... Imagine just looooooong JSON that should be sent by a single POST-request. Say 20 kB. How ? Upvote 0
tigrot said: Split each request into smaller answer Click to expand... Imagine just looooooong JSON that should be sent by a single POST-request. Say 20 kB. How ?
tigrot Well-Known Member Licensed User Longtime User Oct 1, 2021 #12 Split it. A long string is composed of short ones. ???A microcontroller is not useful for such a task, sorry. Upvote 0
Split it. A long string is composed of short ones. ???A microcontroller is not useful for such a task, sorry.
peacemaker Expert Licensed User Longtime User Oct 1, 2021 #13 tigrot said: A microcontroller is not useful for such a task, sorry Click to expand... No, modern controllers are good, and able to do it (ESP family at least). Yes, not convenient, but it works . For me. RAM allows to make all these. Just to make correct code structure. Upvote 0
tigrot said: A microcontroller is not useful for such a task, sorry Click to expand... No, modern controllers are good, and able to do it (ESP family at least). Yes, not convenient, but it works . For me. RAM allows to make all these. Just to make correct code structure.
tigrot Well-Known Member Licensed User Longtime User Oct 1, 2021 #14 peacemaker said: No, modern controllers are good, and able to do it (ESP family at least). Yes, not convenient, but it works . For me. RAM allows to make all these. Just to make correct code structure. Click to expand... You are on the edge, very critical situation. Maybe a 40kb stack can help. Creating simple sub's to handle each extraction can help too. Upvote 0
peacemaker said: No, modern controllers are good, and able to do it (ESP family at least). Yes, not convenient, but it works . For me. RAM allows to make all these. Just to make correct code structure. Click to expand... You are on the edge, very critical situation. Maybe a 40kb stack can help. Creating simple sub's to handle each extraction can help too.
peacemaker Expert Licensed User Longtime User Oct 1, 2021 #15 tigrot said: Maybe a 40kb stack can help Click to expand... It was critical with stack of 1000 bytes. And finally all has came good with 1300. Upvote 0
tigrot said: Maybe a 40kb stack can help Click to expand... It was critical with stack of 1000 bytes. And finally all has came good with 1300.
tigrot Well-Known Member Licensed User Longtime User Oct 1, 2021 #16 Use 2000, you won't regret??? Upvote 0
tigrot Well-Known Member Licensed User Longtime User Oct 3, 2021 #17 Forgive me, I have stopped to search for ESP memory info's when I saw 8266 memory. Now I see that ESP32 is up to 512KB ram?. Last edited: Oct 3, 2021 Upvote 0
Forgive me, I have stopped to search for ESP memory info's when I saw 8266 memory. Now I see that ESP32 is up to 512KB ram?.