Hi,
I'm working on DK-TM4C129X with TI-RTOS 2.00.01.23, NDK 2.23.01.01 and CCS 6.
I made the changes in the EMACSnow.c file as described in TI-RTOS TM4C129 Emac Issues but this seems doesn't work for me.
I have an http server that sends JSON strings.
I had define 11 strings with length less than 200. In my cgi I call a function that insert these strings in 11 buffers with snprintf taking values from an array that contains data that I want to show in my web page. Finally I send any string with httpSendClientStr.
//JSON string example:
#define JSON_TEMPERATURE "\"rf_temp_1\":{\"value\":\"%.2f\",\"ok\":\"%d\"},\"rf_temp_2\":{\"value\":\"%.2f\",\"ok\":\"%d\"},"
//snprintf example:
snprintf(temperature, MAX_RESPONSE_SIZE, JSON_TEMPERATURE, vals[TEMP_RF_1].value, vals[TEMP_RF_1].ok, vals[TEMP_RF_2].value, vals[TEMP_RF_2].ok);
//send string with:
httpSendClientStr(htmlsock, json_pointer[i]);
where json_pointer[i] points to the string resulting from snprintf.
Every time that I change something in my code, for example the content of a JSON string or add/remove/move a piece of code (included the System_printf or the heartBeatfxn in the empty project example) the server stops to work (more specifically it isn't pingable).
I tried to lower CPU clock frequency to 80MHz, upgrade the network task stack sizes to 4096 bytes, use DHCP and static IP, send html rather than JSON but every time I change something the server starts or stops to work, in my opinion, without any apparent logic.
An example:
I worked with 80MHz CPU freq and network task stack sizes of 4096 bytes, because these seemed to make reliable my server that didn't work anymore at 120MHz and 2048 bytes stacks sizes.
After the last little change inside a JSON string the server stops ping again.
After many attempts I add "SysCtlDelay(0x400000);" line in my main() before board init functions (as someone suggested in a discussion) and the server restarts to ping.
But doing other tests I delete "SysCtlDelay(0x400000);", I set again the CPU at 120MHz and the server also works, when before it didn't at this frequency.
Sorry I'm a beginner with TI-RTOS and I can't really find a connection between the changes made and the http server behavior.
Maybe are there limitations in the content type of data that I can send with this http server?
Is it possible that TI-RTOS TM4C129 Emac Issues doesn't solve the problem entirely?
Finally, I see that there is also the EMACTiva.c file in the emac drivers folder, why apply changes only to EMACsnow.c?
Thanks in advance.
Regards,
Enrica