-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
screen refresh out of TC interrupt in bees, c++/juce compatibility in bees, block processing, more #254
Conversation
… some dead code along the way.
…g some issues. remove tons of dead code. start adding human-readable module doc generation in descriptor step. show baudrate on screen in debug build.
… now properly reports initial param values and doesn't randomly crash when booted from a scene
…d sometimes overrun the event queue on startup.) also lots of dead code and comments.
…atibility checks in bees headers. fix potentiall nasty index-underflow bug on op_gfx.
Conflicts: apps/bees/src/op.h apps/bees/src/param.c apps/bees/src/scene.c
…led op-creation selection
…ing gfx util sources
Hmm - I got interested in the event queue because all the serial-overload bees crash states I've seen seem to spew event queue-full errors, even after the overloading serial comms stimulus is removed. Maybe the change to move screen refresh out of interrupt prevents serial-overload crash already? Will test at home. One other possibility is that bees simply cannot recover from a totally full event queue. Thinking one way to test this is rig some op or other with an event-queue-flooding payload (also experiment with different types of events for the payload), send the booby-trapped op a single bang, and see if the system subsequently recovers... |
well, when events are being raised faster than they are processed, eventually nothing will happen until something slows down (a soft timer or peripheral.) what i was thinking of was your suggestion that the event queue should be emptied instead of saturated. i tried this at once point a long time ago and can't really remember how it worked out - certainly the effects were unpredictable. but it might be more recoverable. i would definitely want to accompany some really obvious UI thing, like immediately flashing the whole screen white or something, so the user is warned that stuff isn't necessarily going to make sense until something is throttled. |
What you're saying does make a lot of sense. Theoretically I would expect UI to get a bit intermittent & buggy under those overload conditions, but more or less keep on trucking even if some button-presses or screen-redraws get dropped. However allowing the event queue circular buffer to wrap (effectively completely draining it from full) didn't actually prevent outright crash due to serial overload. Interesting problem - maybe b0761f7 provides a missing piece of the puzzle... |
…screen. seems to work pretty well. possible for screen to become unrecoverably corrupted after an interrupted refresh, but timer events continue to be serviced?
26c2e47 looks like a bunch of DOS line-endings leaked into files that were previously using UNIX convention. this means I can't merge my changes to param.c into a local copy of catfact/dev . Can we look at that before merging these commits? |
huh! yes of course... sorry about that |
ok i blasted the whole tree with dos2unix and i have no problems merging.. does it work for you? |
that's one way to skin this particular cat I guess - kind of uneasy about it gimme a sec maybe I can squish out the mistake and retain the commit history... |
can't untangle the mess with rebase magic - but able to merge both my active branches into local copy of your dev (after the dos2unix commit) - just testing if anything's broken now... EDIT: bfin module emulator build broken after the merge - once I fix that & re-test the serial comms we can merge this... |
i have no problem closing this request and redoing (26c2e47), the big one that seems to have introduced CRs. dos2unix only got a few bees sources: and a great many things from 3-rd party code (libfixmath, fat_io_lib, and juce) |
ok other than the CR thing all ok to merge. Only 2 trivial changes required to fix emulator build. Serial overload still triggering hard crash (no more so than on the unmerged feature branch) - only difference is we now have the 'white screen of death'. I'm going to try the event-queue-bomb-payload thing see if that also triggers the crash... |
how weird, i can't get a crash at all now with timers, even with several running at 1ms. i suppose serial interrupts could be coming in at >1khz though. it clearly isn't a good idea to do this though, or expect that the avr32 can keep up with that many interrupts and keep all the timers going. if a large-throughput transactoin is required, seems mandatory to pause app processing (i.e., disable timer IRQs) until it is done. have you tried that yet? |
nope haven't tried it - let's have a look around for the right incantation... |
(re-do of #254) screen refresh event (with WSOD), beekeep_juce, block process tweaks
kind of a grab bag of changes, including some experiments that haven't worked out yet, and some unfinished but promising things, and finally a few things that seem useful.
__cplusplus
switches, and avr32_sim sources compile again, and will even link with g++.