frank wornle - 2009-11-11

Tim,

This could be for a few reasons... when I designed the first edition of this toolbox, there was no LCD display on the evaluation board I used. So, in order to display error messages, I used a simple LED - which I had flash in different patterns. The function call "abort_LED(10)" caused the LED to flash once (for 1), short pause, no flash (for 0), pause... thus indicating "error 10". When the LCD display become available, I simply replaced this routine by one that displayed the error on the display.

Now, searching for "abort_LED(10)" you find multiple instances of this function call... my guess is, this is a "memory overflow". Try modifying file ".../mc/core/mc_buffer.h" which features the definition for macro "BufferSet":

#define BufferSet(BPtr,val) \ if(NotFullBuffer(BPtr))\ {\ BPtr->buf[BPtr->head] = val;\ BPtr->head = IncCount(BPtr->head,BPtr->bufLength);\ BPtr->byteCount++ ;\ }\ else\ {\ abort_LED(10);\ }

If you replace the "10" by any other number (eg. "42"), the error should change to this number. Should this happen, you'll have to find all occurrences of where this macro is used (.../mc/core/mc_freePortComms.c and, if you are using the External Mode interface, .../ml/rtw/c/src/ext_mode/serial/ext_serial_9s12_port.c). Then try to find out why the buffer overruns - generally, this happens when running a FreePortComms block at too fast a rate or when producing too much upload data for the serial line to cope (ExternalMode).

F.