I am working on a project to develop UART-TCP bridge the interface demands a higher throughput; here length of the payload is not fixed so looking for inter-character gap to find end of the frame received from UART ISR.
ser->tgap = 5; //Expecting 5ms timeout
xQueueReceive(com->rx_queue, &cByteRxed, (ser->tgap/ portTICK_RATE_MS));
But the “xQueueReceive” returns only after 5 SysTicks that is 10*5 = 50ms not 5ms always. According to FreeRTOS documentation it is possible to get timeout in ms irrespective of SysTick by using “timeout/portTICK_RATE_MS” not sure what is going wrong any suggestions would be grateful. Following are the configurations used.
OS version : FreeRTOS v5.03
"#define configCPU_CLOCK_HZ ((unsigned portLONG)96000000) "
“#define configCPU_PERIPH_HZ (configCPU_CLOCK_HZ / configPCLK_DIV)”
"#define configTICK_RATE_HZ ( 100) /* SysTicks per 10ms*/ - FreeRTOSConfig.h "
“#define portTICK_RATE_MS ( ( portTickType ) 100 / configTICK_RATE_HZ ) - portmacro.h”