Hello,
working on 256A3 with 32MHz internal clock. Project information said, that only 19% of flash is used and 64% of RAM is free. Nothing special:
But, I came to the point, that adding a line in program results in numerous application resets at the beginning and also while working, it is reseting without reason - from my side of view.
And, adding line or two, system is again working - and sometimes not.
So, I am really confused and lost in space. All units by them self are working. adding one by one it is OK till certain point, when system starts to reset and sometimes hangs. Strange...
Any help is top welcome...
Best regards,
Andrej
working on 256A3 with 32MHz internal clock. Project information said, that only 19% of flash is used and 64% of RAM is free. Nothing special:
Code
program DSC;
{$DEFINE DSC}
{$NOSHADOW}
{ $WG} //global Warnings off
Device = xmega256A3, VCC=3.3;
{ $BOOTRST $20000} //Reset Jump to $20000
Import SysTick, RTclock, TINAstack, ADC_A, TickTimer, TickTimer2,
SLIPportC0, SPI_D, SLIPportE0, SLIPportE1, SerPortF0;
From System Import longWord, FlashCheck_S;
From SerPort Import SerPortSelect;
Define
OSCtype = int32MHz, //CPU=32MHz
PLLmul=4,
prescB=1, //PeripherX4=32MHz
prescC=1; //PeripherX2=32MHz
SysTick = 10, adj; //msec
StackSize = $0100, iData;
FrameSize = $0100, iData;
RTClock = iData, DateTime; //Time, DateTime
RTCsource = SysTick;
TINAdriver = ENC424J600; // Ethernet
TINAport = SPI_C, PortC, 4; // SPItyp, SS_Port, SS_Pin
TINAtimer = Timer_D0;
TINAsockets = 4;
ADCrefA = REF100; // intern 1.0V reference
ADCprescA = 256; // prescaler 256
ADCchansA = [ 0, 1, 2];
TickTimer = Timer_C0; // use Timer_C0 and no PortPin
TickTimer2 = Timer_C1; // use Timer_C1 and no PortPin
SLIPportC0 = 115200; // LCD
SLIPportCtrlC0 = PortC, 0, positive;
SPIorderD = MSB; //FRAM
SPImodeD = 0; //Clock Phase and Polarity
SPIprescD = 1; //presc = 0..3 -> 4/16/64/128
SPI_SSD = PortD, 4; //bit for SS chipselect
SLIPportE0 = 115200;
SLIPportCtrlE0 = SingleWire; //no line driver involved
SLIPportE1 = 115200;
SLIPportCtrlE1 = SingleWire; //no line driver involved
SerPortF0 = 115200, parEven;
TxBufferF0 = 255, iData;
RxBufferF0 = 8, iData;
FlashChkSum = ProgEnd;
Uses
System, DSC_Globals_V70, FRAM, TINA, tnDHCP, LCD, Ethernet,
xSC_Engine, xSC_SW_SLIP, Monitor, DSC_Monitor;
{$DEFINE DSC}
{$NOSHADOW}
{ $WG} //global Warnings off
Device = xmega256A3, VCC=3.3;
{ $BOOTRST $20000} //Reset Jump to $20000
Import SysTick, RTclock, TINAstack, ADC_A, TickTimer, TickTimer2,
SLIPportC0, SPI_D, SLIPportE0, SLIPportE1, SerPortF0;
From System Import longWord, FlashCheck_S;
From SerPort Import SerPortSelect;
Define
OSCtype = int32MHz, //CPU=32MHz
PLLmul=4,
prescB=1, //PeripherX4=32MHz
prescC=1; //PeripherX2=32MHz
SysTick = 10, adj; //msec
StackSize = $0100, iData;
FrameSize = $0100, iData;
RTClock = iData, DateTime; //Time, DateTime
RTCsource = SysTick;
TINAdriver = ENC424J600; // Ethernet
TINAport = SPI_C, PortC, 4; // SPItyp, SS_Port, SS_Pin
TINAtimer = Timer_D0;
TINAsockets = 4;
ADCrefA = REF100; // intern 1.0V reference
ADCprescA = 256; // prescaler 256
ADCchansA = [ 0, 1, 2];
TickTimer = Timer_C0; // use Timer_C0 and no PortPin
TickTimer2 = Timer_C1; // use Timer_C1 and no PortPin
SLIPportC0 = 115200; // LCD
SLIPportCtrlC0 = PortC, 0, positive;
SPIorderD = MSB; //FRAM
SPImodeD = 0; //Clock Phase and Polarity
SPIprescD = 1; //presc = 0..3 -> 4/16/64/128
SPI_SSD = PortD, 4; //bit for SS chipselect
SLIPportE0 = 115200;
SLIPportCtrlE0 = SingleWire; //no line driver involved
SLIPportE1 = 115200;
SLIPportCtrlE1 = SingleWire; //no line driver involved
SerPortF0 = 115200, parEven;
TxBufferF0 = 255, iData;
RxBufferF0 = 8, iData;
FlashChkSum = ProgEnd;
Uses
System, DSC_Globals_V70, FRAM, TINA, tnDHCP, LCD, Ethernet,
xSC_Engine, xSC_SW_SLIP, Monitor, DSC_Monitor;
But, I came to the point, that adding a line in program results in numerous application resets at the beginning and also while working, it is reseting without reason - from my side of view.
And, adding line or two, system is again working - and sometimes not.
So, I am really confused and lost in space. All units by them self are working. adding one by one it is OK till certain point, when system starts to reset and sometimes hangs. Strange...
Any help is top welcome...
Best regards,
Andrej