[EXT_EP-8953] ClockP_usleep() for FreeRTOS calculates delay incorrectly Created: 01/Feb/18 Updated: 19/Feb/20 Resolved: 01/Feb/18 |
|
| Status: | Fixed |
| Project: | Embedded Software & Tools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | TI User | Assignee: | TI User |
| Resolution: | Fixed | Votes: | 0 |
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Product: | TI Device Drivers |
| Internal ID: | TIDRIVERS-1441 |
| Found In Release: | 3.50.00 |
| Fix In Release: | 3.60.00 |
| Release Notes: | ClockP_usleep(usec) for FreeRTOS calculates the delay passed to vTaskDelay(), using portTICK_PERIOD_MS. This macro is defined in FreeRTOS/Source/portable///portmacro.h as: #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ ) If configTICK_RATE_HZ were ever set to a value > 1000, this would be 0. It is probably also better to use defines that are in FreeRTOSConfig.h. Instead, we could calculate the delay for ClockP_usleep(usec) as: tickPeriouUs = 1000000 / configTICK_RATE_HZ; /* Tick period in microseconds */ delay = (usec + tickPeriodUs - 1) / tickPeriodUs; /* Take the ceiling */ |
| Description |
|
ClockP_usleep() for FreeRTOS calculates delay incorrectly |