FreeRTOS Ports - please change (temp fix): #define portTICK_PERIOD_MS ( ( TickType_t ) 1024 / configTICK_RATE_HZ ) to avoid division by zero hard fault - add to https://devzone.nordicsemi.com/f/nordic-q-a/65422/what-are-sdk-17-x-0-known-issues

Hello,

In at least one of the FreeRTOS ports in the v17.1.0 SDK - the portTICK_PERIOD_MS will result in a hard fault if calls that have been customarily used like:

vTaskDelay(250 / portTICK_PERIOD_MS); // will result in a hard fault if used as is.

#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )

results in ->  1000 / 1024 -> 0 

A temp fix is:

#define portTICK_PERIOD_MS ( ( TickType_t ) 1024 / configTICK_RATE_HZ )

A better clocking scheme is possibly in order - but this needs be pointed out here:

 https://devzone.nordicsemi.com/f/nordic-q-a/65422/what-are-sdk-17-x-0-known-issues

Regards to Vidar Berg for all of his help too.

Thanks,
John

Related