fb0 wrote on Friday, August 28, 2015:
Heins,
Thanks a lot for the help and explanations.
I spent the last few days porting FreeRTOS+TCP over, and got it mostly working using out 1024Hz tick rate. A few things worth noting however:
- The licensing is hazy as there is no option today to purchase a commercial license.
- The rate at which gratuitous ARP messages is sent is non configurable and very agressive (every 20s), causing unwarranted power drain.
- portTICK_PERIOD_MS is used in many place and causes problems (I had to address them manually). See below:
FreeRTOS_ARP.c:#define arpGRATUITOUS_ARP_PERIOD ( 20000 / portTICK_PERIOD_MS )
FreeRTOS_DHCP.c: #define dhcpINITIAL_TIMER_PERIOD ( 250 / portTICK_PERIOD_MS )
FreeRTOS_DHCP.c: #define dhcpINITIAL_DHCP_TX_PERIOD ( 5000 / portTICK_PERIOD_MS )
FreeRTOS_DHCP.c: #define dhcpMAX_TIME_TO_WAIT_FOR_ACK ( 5000 / portTICK_PERIOD_MS )
FreeRTOS_DHCP.c:#define dhcpDEFAULT_LEASE_TIME ( ( 48UL * 60UL * 60UL * 1000UL ) / portTICK_PERIOD_MS ) /* 48 hours in ticks. */
FreeRTOS_DHCP.c:#define dhcpMINIMUM_LEASE_TIME ( 60000UL / portTICK_PERIOD_MS ) /* 60 seconds in ticks. */
FreeRTOS_DHCP.c: (*1000) then ticks (/portTICK_PERIOD_MS). */
FreeRTOS_DHCP.c: xDHCPData.ulLeaseTime *= ( 1000UL / portTICK_PERIOD_MS );
FreeRTOS_DNS.c: xTimeout /= portTICK_PERIOD_MS;
FreeRTOS_DNS.c:TickType_t xTimeoutTime = 200 / portTICK_PERIOD_MS;
FreeRTOS_IP.c:#define ipINITIALISATION_RETRY_DELAY ( ( ( TickType_t ) 3000 ) / portTICK_PERIOD_MS )
FreeRTOS_IP.c: #define ipconfigMAX_IP_TASK_SLEEP_TIME ( 10000UL / portTICK_PERIOD_MS )
FreeRTOS_IP.c: prvIPTimerReload( &xTCPTimer, ipTCP_TIMER_PERIOD_MS / portTICK_PERIOD_MS );
FreeRTOS_IP.c: ulNextInitialSequenceNumber += ipINITIAL_SEQUENCE_NUMBER_FACTOR * ( ( xTimeNow - xStart ) * portTICK_PERIOD_MS );
FreeRTOS_IP.c: prvIPTimerReload( &xARPTimer, ipARP_TIMER_PERIOD_MS / portTICK_PERIOD_MS );
FreeRTOS_TCP_WIN.c: return ( ( xTaskGetTickCount() - pxTimer->ulBorn ) * portTICK_PERIOD_MS );
include/FreeRTOSIPConfigDefaults.h: #define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ( 20 / portTICK_PERIOD_MS )
include/FreeRTOSIPConfigDefaults.h: #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( 999 / portTICK_PERIOD_MS )
include/FreeRTOSIPConfigDefaults.h: #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( 30000 / portTICK_PERIOD_MS )
Cheers,
Francois
Edit: I cannot for the life of me get those lines to be correctly formatted, sorry 