Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : PicoMite/VGA/WEB V5.07.08 release candidates
Page 2 of 18 | |||||
Author | Message | ||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Hi Chris Could you please share some insights into the logic behind how you logged “dogged” and “***froze”? Are the two heartbeats two watchdogs? Are there manual entries or is the log fully automated? Did “froze completely USB restart” require physical intervention F2? I’ve tried programmatically reporting reboot root cause on restart but have not been successful so far. I look forward to your insights. Cheers Carl Retirement is tough on Hobbies without a day job |
||||
TheMonkeys Regular Member Joined: 15/12/2022 Location: AustraliaPosts: 59 |
Hi Carl, I should have clarified that *** are comments I added to the otherwise automatic log. The second heartbeat is a 5 * RGB LEDbar that I update in the programme to display status (RGBLed(led,red,green,blue) is a wrapper for "Bitbang ws2812"). ch=Val(Field$(Time$,1,":")):cm=Val(Field$(Time$,2,":")):cs=Val(Field$(Time$,3,":")) rd=ch*5: gn=cm*2: bl=cs*2 ' Time of Day If (Timer Mod 1000)<200 Then RGBled(cort,rd,gn,bl) ' H,M,S Else RGBled(cort,rd/8,gn/8,bl/8), ' h,m,s EndIf The "USB restart" was physically unplugging a completely unresponsive Webmite. "dogged" vs "started" is determined by the value of MM.Watchdog. The other thing logged this morning was an hour of freeze before the watchdog kicked in. This is the software, not hardware, watchdog. Cheers, Chris |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Thanks Chris Sounds like a disco time keeper :) Cheers Carl Retirement is tough on Hobbies without a day job |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Another Time related oddity just cropped up on my side. Time$ would not advance, remained fixed, however Timer was ticking away. Time travel or did time stop for me :) Only way to get Time$ ticking again was through a hard reset of the Pico. Weird and so far have not been able to replicate it. Cheers Carl Retirement is tough on Hobbies without a day job |
||||
TheMonkeys Regular Member Joined: 15/12/2022 Location: AustraliaPosts: 59 |
From my log earlier today... 00:59:53 dat/activity.log: 3 rotates 01:14:52 State: tmax:28.9 tmin:27.5 ts:3 tstat:23 debug:&B11 01:29:52 State: tmax:28.9 tmin:27.5 ts:3 tstat:23 debug:&B11 01-01-2000 dogged@00:00:11 Legion WebmiteOmnibusWebserver 12R2.6 21 Sep 2023 11:40 00:05:10 Schedule: ###daily restart### [run ".current"] 22-09-2023 dogged@01:40:45 Legion WebmiteOmnibusWebserver 12R2.6 21 Sep 2023 11:40 01:44:52 State: tmax:28.9 tmin:27 ts:3 tstat:23 debug:&B11 Note the dog time before the restart. Perhaps the time bug might be back... The restart is just a test of my scheduler. Yes, it was the second time it restarted today. |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Just had a freeze that the external watchdog didn't even catch. The pat pin stayed low in the frozen state. I'm going back to b18 and see if that proves to be more stable. Cheers Carl Retirement is tough on Hobbies without a day job |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
b18 is also exhibiting TIME$ standing still. Cheers Carl Retirement is tough on Hobbies without a day job |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6099 |
It does look like the stopping clock has returned. My production pico has been running without a reboot for 7 weeks so far on beta 10. I have set up a test system running on beta 14 to try and determine which beta caused the bug to re-appear. It will need to run for 24 hours to test. The RTC and settick both stop and presumably, the software watchdog as well. Jim VK7JH MMedit MMBasic Help |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Busy running b17, which appears to be more stable so far, but hasn’t been running for 24 hours yet. Cheers Carl Retirement is tough on Hobbies without a day job |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
b15 through RC1 crashes when the web server has more than one connection it's serving the same page too. b17 made it through the night without TIME$ freezing. Will now try b14 but need to remove all the /*_*/ . b14 serves two requests for the same page without crashing. Cheers Carl Retirement is tough on Hobbies without a day job |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
Could these two commands possibly be combined into a single command, with the 'compressed' aspect encoded into the width/height field? For example, an uncompressed CSub sprite looks like this (for *Bert): CSub Glyphs 00000000 000E0010 ' 0 0000CAA0 0000CCAA 880CCAA8 000CCAA8 FFCCAAA8 00CCCAA8 F2AAAA80 00CCAAA8 F2AAA800 0CCCAAA8 88AA8000 0CCAAA8A 8A880000 0CCAAAAA A8880000 0CCAAAAA AA880000 00AAAAA8 88800000 000AA8AA 88000000 0000AAA8 88800000 00000A80 8A088000 0000A88A 88800000 000A8800 end csub It's hard to imaging that we will ever need 32 bits to specify the height and width of the sprite. That first word could be changed to "F00E0010" to indicate that the data following is compressed. The benefit to this is that the MMBasic program wouldn't need to know if the sprite is compressed or not, and compression could be performed after the fact if, say, memory is getting tight, without having to go through the program and change some or all BLIT MEMORY commands to BLIT COMPRESSED. Thanks! Visit Vegipete's *Mite Library for cool programs. |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Gone all the way back to b10 and opening a second request for the same page on a different IP Address freezes the Webmite.I don't have betas before b10. Tried it on 5.07.07 with the same result. Webmite can't serve the same page to two different IP Addresses. Keep getting unexpected packet errors on the CYW43. For what its worth here is the WebInterrupt routine Sub ServiceWebInterrupt '----------------------------------------------------------------------------------------- 'Web server restricted to GET only for browser compatibility. POST doesnt work with Safari '----------------------------------------------------------------------------------------- Local a%, p1%, p2%, p3%, p4%, file$, buff%(4096/8), dataname$, datavalue$ PatDog 'WatchDog HW 8331 For a% = 1 To MM.Info(MAX CONNECTIONS) PatDog 'WatchDog HW 8331 If Not (MM.Info(TCP Request a%)) Then Continue For 'Skip non connections from PWillard addendum PatDog 'WatchDog HW 8331 WEB TCP READ a%, buff%() PatDog 'WatchDog HW 8331 If LInStr(buff%(),"GET") Then p1%=LInStr(buff%(),"GET") '[GET /url.url HTTP1.1] GET pointer . . . PatDog 'WatchDog HW 8331 EndIf Next a% PatDog 'WatchDog HW 8331 For a%=1 To MM.Info(max connections) On error skip WEB TCP Close a% Next a% End Sub The Web serving issue is probably not related to the TIME$ freezing? Any pointers welcome? Cheers Carl Retirement is tough on Hobbies without a day job |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9122 |
V5.07.08RC3 https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip This has a major tidy up of the code to eliminate all compiler warnings A change to WEB TRANSMIT PAGE made in b12 has been backed out. I don't know if this created some instability but thus far RC3 runs Geoff's watering controller for me without any obvious problems so far This version includes support for a Brazilian keyboard layout OPTION KEYBOARD BR This is very different to the approach documented in the manual. I can't get my head round how or why it may or may not be giving problems (possible race conditions) but the manual approach is much simpler and I don't propose to even think about what may be going on with this approach. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4042 |
Thanks Peter, and thanks for updating the copy on GitHub. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9122 |
Getting rid of the warnings was a major issue. This all stems from the original PIC code. In the PIC there is a compiler option no-signed-char or something like that. This sets all chars to unsigned unless specifically defined as "signed char" and string functions don't complain. On the ARM compiler all the stdlib functions require a char. HOWEVER, you get a warning if you use a char as an array index and MMBasic does lots of that. So to get rid of the warnings I had to include massive numbers of explicit type conversions (over a 1000). It also picked up a couple of == instead of = |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4042 |
I am a bit surprised, I assume you tried adding this to CMakeLists.txt: add_definitions(-funsigned-char) Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Thanks for the response Peter The For loop is as per the Webmite manual. The If Not (mm.info(tcp request a%)) then Continue For Is from the Picomite Web Reference by pwillard, in his example on page 18, Sub TCPRequest towards the bottom of the page. To my mind this speeds things up; if there is no tcp connection for a% then the buffer is not processed. Maybe the web interrupt is interrupting itself, but I’m under the impression from the manual that interrupts are blocking… With RC3 the any attempt from a different ip address to access an already open and served page is still freezing the Webmite, given that the open page is requesting JSON strings at regular intervals. I’m now going through the Interrupt routine with a fine tooth comb to see what I’ve done wrong. Cheers Carl Retirement is tough on Hobbies without a day job |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9122 |
The manual does not close already closed PCBs with an ON ERROR that may have been re-used by a different connection. You also have a possible race condition between testing the PCB and then closing it during which time it may have been opened. This is all you need, as per the manual SUB WebInterrupt LOCAL a%, p%, t%, s$ FOR a% = 1 To MM.INFO(MAX CONNECTIONS) WEB TCP READ a%, buff%() p% = LINSTR(buff%(),"GET") t% = LINSTR(buff%(),"HTTP") If (p% <> 0) And (t% > p%) Then WEB TRANSMIT PAGE a%,"index.html" ENDIF NEXT a% END SUB |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Thanks Peter I relooked at the routine and simplified it, with your pointers. It looks as though the Tokeniser issue is back. Code was originally enclosed in /*_*/ and the EDITor handled it properly but at run time the error message below on the console. [897] /* For a%=1 To MM.Info(max connections) Error : No matching END declaration > option list WebMite MMBasic Version 5.07.08RC3 I changed the comment to the following and it ran without issue. '/* For a%=1 To MM.Info(max connections) ' On error skip ' WEB TCP Close a% ' Next a% '*/ /CODE] Thanks for the assistance, it is much appreciated. Cheers Carl Retirement is tough on Hobbies without a day job |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6099 |
I regret to advise that my test webmite clock stopped twice in the last 24 hours. Once in the wee hours when there was no activity and once this morning just after I accessed a web page. It is running the same, very basic code that has been running for 7 weeks + on the main webmite on b10 OPTION LIST WebMite MMBasic Version 5.07.08RC3 OPTION CPUSPEED (KHz) 250000 OPTION WIFI xxxxxx, **********, yyyyyyy OPTION TCP SERVER PORT 80, 1000 OPTION UDP SERVER PORT 6802 OPTION TELNET CONSOLE ON > On other tests beta 14 might have been OK (24 hours without clock stopping) and beta 16 had issues. Jim VK7JH MMedit MMBasic Help |
||||
Page 2 of 18 |
Print this page |