Data Logger stopped entirely to work
응답
16. 9. 27 오후 1:20

Hello everyone,

I tired to modify the code of the XDK manually. It did not work out. When a SD card is inserted, the orange and yellow lamp are lit permanently. Flashing the XDK with the original version of the Data Logger however does not work anymore.

I get following message in console:
 INFO | XDK DEVICE 1:  config.max44009_enabled: 1
 INFO | XDK DEVICE 1:  config.max44009_integration_time: 100
 INFO | XDK DEVICE 1:  config.max44009_sampling_rate_timer_ticks: 1000
 INFO | XDK DEVICE 1:  
 INFO | XDK DEVICE 1: ----- STACK OVERFLOW -----Task Name:Tmr Svc-----Current Task Handle:0x2000bc80

Can you give me some advice how to fix the XDK?

I use Win7 64 bit, Workbench 1.6.0 and Datalogger v2

 

Here is the code I originally inserted:

In the file XDK_Datalogger_cc.c

I added a term within the big loop of SDC_writeBackBuffer to determine the filesize.

fseek(&fileObject, 0L, SEEK_END);
filesize= ftell(&fileObject);

if(filesize >= 1000000)

// create new file if file is bigger than 1000000

{

BackBuffer->length = 0;
    BackBuffer->data[0] = 0;
    ActiveBuffer->length = 0;
    ActiveBuffer->data[0] = 0;
    newFile = 1;
    addnewfile = 1;
    closefile = 1;

}

0 (0 투표)
RE: Data Logger stopped entirely to work
응답
16. 9. 27 오후 4:05 as a reply to Oliver Ilnicki.

Hello Oliver,

I assume that the posted console log is related to your modified datalogger application. Does the red LED also turn on when running your application. Be aware that a stack overflow always occur when the stack size of a task exceeds. Further a stack overflow requires a manual forcing of the XDK into the bootloader mode to be able to flash an other application to it. For more information please refer to the section 3.6.2.3.6 in the general information guide you can find here.

Based on your information, I suggest to check the modifications in the loop in SDC_writeBackBuffer(). I assume that the modifications require a lot of stack size and trigger the stack overflow.

I hope this could help you.

Kind regards,
Franjo

0 (0 투표)
RE: Data Logger stopped entirely to work
응답
16. 9. 28 오전 8:15 as a reply to Franjo Stjepandic.

I solved the problem.

Stackoverflow was occuring with unmodified version of the Source Code as well.

However, it only occurred when the SD card was within the XDK. It seems the modified code somehow corrupted the SD-card. The SD-card could still be used in Windows, but it crashes the XDK.

A full format of the SD-card (Quickformat is not enough) resolved the problem.

Kind Regards

Oliver

0 (0 투표)
RE: Data Logger stopped entirely to work
응답
16. 9. 28 오전 11:04 as a reply to Oliver Ilnicki.

Hello Oliver,

I am glad to hear that you got it to work again.

Please don't hesitate to ask if you have further questions.

Kind regards,
Franjo

0 (0 투표)