3 main loop, disable timer isrs leaving only comms and enter loop with delay sending out errors - this gives possibility to use comms to load better data and reset without engine running at all
5 split files down to smaller chunks
6 write functions for wrapping
7 caveats document - easy to screw up by x, y, z, etc
8 assumptions document - no small table access in isrs
9 think about header types and return semantics and buffer location independence etc
10 Look at pointers for memory rearrangement
11 Ditto, pointers for paged ram tables etc to make code more readable - not so sure now
12 Check ALL isr code for refs to TableA - TableD : separate headers out to avoid this problem
13 Further work on serial errors and debug packets etc
14 see if we can make the flash block location pointers constants in flash const volatile
15 see if const array of injector register locations will work now - may not have had rodata or similar back then...
16 finish memory management doc
17 group functions that call each other a lot by page
18 put things called from everywhere in text/text1 - break text into two chunks, one for stuff that must go there, and one for stuff that is faster if it goes there.
19 minh special stack pointer return function so we can know if there is room for a flash burn buffer
20 async errors mask for which to send and which to not send - based on counts or what?
21 debugs not sent counter and method send if the tx buffer is empty only logic
24 possibly switch to pointers for all small tables etc to enhance readability :
28 (twoDTableUS*)&TablesA.SmallTablesA.injectorDeadTimeTable
32 (twoDTableUS*)&(TablesA->injectorDeadTimeTable)
34 is the above redundant, ie, is the last part already a twodtableus pointer?
40 if it was just a pointer...
44 5) Look at configuration errors and see if they can be done a better way, ie without possibility for an error
45 3) Async errors and debugs should be done by saving the count each send period <user defined> and send a
46 packet for each count with the appropriate code in it and perhaps a count difference or count total
47 too. this could be masked in a similar way to that intended for logging packets.
48 4) Standardise the naming of error values, match their ordering to aid in 3)
49 18) change calls to senderror to increments of counters to be sent via the central error sending function
54 12) rawByte or rawValue not consistent
55 13) packet/payload not consistent
56 14) type/id not consistent
57 17) later, refactor to use UART prefix such that flags for CAN can start with CAN and be obviously unambiguous