Content originally posted in LPCWare by MarcVonWindscooting on Tue Feb 09 09:12:07 MST 2016
We all hate that - tested modules don't work any more!
I had a short look at you project code. No offence, but I'm almost always appalled by code not written by me, because I grew up without any influence from so-called professional tools, or any 'standard' c-library .
It puzzles my, why every embedded programmer seems to build a software-timer like this: use some hardware to generate periodic interrupts and increment some variable from this interrupt.
Bullshit! |( What was wrong with the hardware timer in the first place? MRT does the job MUCH better (precision, low overhad, no jitter) than any software solution, really. The only problem is: most programmers are not able to use the hardware. In the case of MRT, you have to use an reload value of 1<<30 and multiply the current counter value by 4 to get a timing value that perfectly wraps around smoothly for easy timing caluculations/measurements. No ISR, no RAM overhead, no waste of cycles!
Once you've saved calculation power, stack usage and lateness, I bet your program runs correctly.
Because I guess, you wasted up the small RAM with printf and other unneccessary stuff. LPC810 is pretty small in RAM.
The boot loaders differ from revision to revision, so does the RAM left behind after the bootloader finished its job. I made a bad experience similar to yours when switching from LPC213x to LPC213x/01. Because of such a subtle difference.
Hope this help a little bit.
Marc