Community news, upcoming events and general discussions
Threads: 36 Posts: 88
Get technical support from the community
Threads: 1427 Posts: 7608
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 36 Posts: 119
Share and discuss community member projects
Threads: 81 Posts: 350
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);
, 0L, SEEK_END);
if(filesize >= 1000000)
// create new file if file is bigger than 1000000
BackBuffer->length = 0; BackBuffer->data = 0; ActiveBuffer->length = 0; ActiveBuffer->data = 0; newFile = 1; addnewfile = 1; closefile = 1;
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 22.214.171.124.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
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.
I am glad to hear that you got it to work again.
Please don't hesitate to ask if you have further questions.