• Fri 2020.04.03

    Finally have made some progress! I have discovered 'WHAT' is going on, but it isn't quite clear 'WHY' the output is behaving the way it is. At the moment, it appears to be how Javascript works, and doesn't appear to be related to the number of pulses seen by setWatch. On a discovery made while using PPI, a hunch I have is to do with the prescaler, as certain frequencies produce very bizarre output data values.

    I'll be spending the next few days collecting data ouptut, then creating functions to present that data for analysis. We'll then have the means to test known values and observe both hardware and software output.




    In that discovery process, I learned a very valuable lesson with garbage collection. While I understood that Espruino performs garbage collection during idle times and using process.memory() causes a modified garbage collection, I finally understand why free memory was getting chewed up at an alarming rate. Knowing the above, I kept monitoring free JsVars, perform a run, then again observe. I would then cut-n-paste into the Left-hand console side of the WebIDE,   Wash, Lather, Rinse, Repeat   What wasn't intuitive was why I was forced to re-upload from the Right-hand editor side, always when the 'FIFO_FULL' flag was set. As I had been paying attention to the free JsVars, then making calculations as to the amount of memory that would have been used by collecting data, that never added up, I should have been paying closer attentiton to the number of JsVars used as well. On occassion, a garbage collection by Espruino freed up gobs of space, and it never dawned on me why. That is, until, . . . I observed that the history value would go down. Upon re-visiting the notes beneath the process reference would clarify, and it then was understood that as the cut-n-paste process was gobbling up precious JsVars, then with certain test data, the program couldn't complete, tripping the 'FIFO_FULL' error. lesson learned


    Will be busy over the next few days collecting data. . . . stay tuned

About

Avatar for Robin @Robin started