We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arduino Nano Matter
2.2.0
2.3.4
macOS 15.1.1
Matter
No response
configTICK_RATE_HZ is set by default in the config to 1024. This causes causes portTICK_PERIOD_MS to be 0.
configTICK_RATE_HZ
portTICK_PERIOD_MS
portTICK_PERIOD_MS is defined as follows:
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
Using floor division, as is the default in C++, 1000 / 1024 = 0.
This breaks a lot of common FreeRTOS code that uses vTaskDelay and such.
vTaskDelay
Some boards provide a pdTICKS_TO_MS. This could also be a provided macro and encouraged. It's usually defined as:
pdTICKS_TO_MS
#define pdTICKS_TO_MS( xTimeInTicks ) ( ( TickType_t ) ( ( ( uint64_t ) ( xTimeInTicks ) * ( uint64_t ) 1000U ) / ( uint64_t ) configTICK_RATE_HZ ) )
14:09:15.232 -> configTICK_RATE_HZ: 1024 14:09:15.232 -> 14:09:15.232 -> portTICK_PERIOD_MS: 0
void setup() { Serial.begin(115200); while(!Serial); Serial.print("configTICK_RATE_HZ: "); Serial.println(configTICK_RATE_HZ); Serial.println(); Serial.print("portTICK_PERIOD_MS: "); Serial.println(portTICK_PERIOD_MS); } void loop() {}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hardware
Arduino Nano Matter
Core version
2.2.0
Arduino IDE version
2.3.4
Operating system
macOS 15.1.1
Radio stack variant
Matter
OpenThread Border Router device (if using Matter)
No response
Issue description
configTICK_RATE_HZ
is set by default in the config to 1024. This causes causesportTICK_PERIOD_MS
to be 0.portTICK_PERIOD_MS
is defined as follows:Using floor division, as is the default in C++, 1000 / 1024 = 0.
This breaks a lot of common FreeRTOS code that uses
vTaskDelay
and such.Some boards provide a
pdTICKS_TO_MS
. This could also be a provided macro and encouraged. It's usually defined as:Serial output
RTT output (if using Matter)
No response
Minimal reproducer code
The text was updated successfully, but these errors were encountered: