Hi Mark,
thanks for your reply.
1) Would you suggest to put something like the following into ctTaskTable[]
{ "R_MassSt", fnMassStorage, MEDIUM_QUE, 0, 0, UTASKER_GO},
and set iMemoryState = SD_STATE_STARTING to stard card initialisation?
The intention is to schedule utasker just once during a cycle (duration of 20...30ms) by invoking 'uTaskerSchedule()'.
Then data shall be stored to the SD card. But it shall also be possible to prevent storing data for some cycles. Accessing the SD card must be done at a defined position within the cycle, i.e. after sampling has been finished. A uTasker timer would not meet that requirement, I am afraid.
2) Using DOS FTP (Windows 7) the 'dir' command is accepted.
The command 'get file222' however results in this:
200 OK.
150 Data.
Nothing more.
After some seconds uTasker runs in an infinite loop at 0xF4:
b 0x000000f4
The call stack from Rowley's CrossStudio just says '(Unknown Function)
', no further information about previous steps.
In this special case it is the data abort exception.
Restoring the last command lead to the function
uMemcpy(ptrValue, fnGetFlashAdd(ParLocation), Size);
which is invoked in
static void fnGetPars(unsigned char *ParLocation, unsigned char *ptrValue, MAX_FILE_LENGTH Size)
The call stack shows these values
Size 0x4000f73c
ptrValue 0x4000f73c
ParLocation 0x4000f8a7
Size obviously is wrong.
So it looks like a memory problem. (MEM_FACTOR for the heap has already been increased to 1.2.)
I also tried to exchange ftp.c, but the file you attached did not contain a definition for
_TCP_SOCKET_MASK
_TCP_SOCKET_MASK_ASSIGN
It could not be found in uTasker version 8 either.
Could you let me know what the definition is, please?
Regards,
Martin