-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
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
[nrf5-lock] start joiner role on boot #1962
[nrf5-lock] start joiner role on boot #1962
Conversation
if (xTaskGetTickCount() > self->mJoinerExpire || self->Impl()->IsThreadProvisioned()) | ||
{ | ||
ChipLogDetail(DeviceLayer, "Thread joiner timer stopped."); | ||
xTimerStop(xTimer, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we check return codes in some form of ASSERT ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Try starting joiner within 15m. | ||
self->mJoinerExpire = xTaskGetTickCount() + pdMS_TO_TICKS(15 * 60 * 1000); | ||
|
||
TimerHandle_t joinerTimer = xTimerCreate("JoinerTimer", pdMS_TO_TICKS(10000), pdTRUE, self, &OnJoinerTimer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check for NULL return in case of failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… nrf5/start-joiner-on-boot
Size increase report for "nrf-example-build"
Full report output
|
Size increase report for "nrfconnect-example-build"
Full report output
|
Size increase report for "linux-example-build"
Full report output
|
Size increase report for "esp32-example-build"
Full report output
|
Size increase report for "gn_nrf-example-build"
Full report output
|
Size increase report for "gn_linux-example-build"
Full report output
|
As of b15c292 ("[nrf5-lock] start joiner role on boot (project-chip#1962)"), we are using too much stack space in timer task. The timer task has a 1k stack and logging along uses a 256 byte stack buffer. The code in GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::OnJoinerTimer should be moved off the timer task. In the meantime increase the stack size to avoid overruns in the thread joiner. Also enable the option configCHECK_FOR_STACK_OVERFLOW, and while we're here also enable configUSE_MALLOC_FAILED_HOOK. These diagnostic options are invaluable for saving debugging time. Since logging uses significant stack space, try to catch stack overflows in the platform LogV(). This fires reliably in OnJoinerTimer prior to enlarging the stack. Depends on project-chip#2185 Fixes project-chip#2187
As of b15c292 ("[nrf5-lock] start joiner role on boot (project-chip#1962)"), we are using too much stack space in timer task. The timer task has a 1k stack and logging along uses a 256 byte stack buffer. The code in GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::OnJoinerTimer should be moved off the timer task. In the meantime increase the stack size to avoid overruns in the thread joiner. Also enable the option configCHECK_FOR_STACK_OVERFLOW, and while we're here also enable configUSE_MALLOC_FAILED_HOOK. These diagnostic options are invaluable for saving debugging time. Since logging uses significant stack space, try to catch stack overflows in the platform LogV(). This fires reliably in OnJoinerTimer prior to enlarging the stack. Fixes project-chip#2187
* nrf5: Enlarge stack to fix thread join overruns As of b15c292 ("[nrf5-lock] start joiner role on boot (#1962)"), we are using too much stack space in timer task. The timer task has a 1k stack and logging along uses a 256 byte stack buffer. The code in GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::OnJoinerTimer should be moved off the timer task. In the meantime increase the stack size to avoid overruns in the thread joiner. Also enable the option configCHECK_FOR_STACK_OVERFLOW, and while we're here also enable configUSE_MALLOC_FAILED_HOOK. These diagnostic options are invaluable for saving debugging time. Since logging uses significant stack space, try to catch stack overflows in the platform LogV(). This fires reliably in OnJoinerTimer prior to enlarging the stack. Fixes #2187 * Reduce timer task memory to 2k * Fix the stack size in EFR32 as well
* -Include the correct FreeRTOS Cortex files in the EFR32 makefiles correspoding to the defined MCU family (MG12 vs MG21) -Init all IRQs priority to a lower priority valid for FreeRTOS API. An IRQ in the gecko radio libs with the default priority 0 (highest) was causing a assert failure in FreeRTOS * Add the IRQ priority init for all EFR32 boards init Restyle some file headers and copyright mentions * Fix build script * Fix sources for EFR32 platform * Set mbedtls to external source * Fix compilation with ninja * Add BoltLockManager to manage the lock and unlock request and state Add DataModelHandler to handle bolt actions from the cluster messages Add Gen folder with the files for silicon lab cluster implementation Strt a server session for UDP messages Include some mbedtls sources files from gsdk 2.7 in gni . TO BE FIX * merge upstream * Added Openthread to the example * nrf5: Enlarge stack to fix thread join overruns As of b15c292 ("[nrf5-lock] start joiner role on boot (#1962)"), we are using too much stack space in timer task. The timer task has a 1k stack and logging along uses a 256 byte stack buffer. The code in GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::OnJoinerTimer should be moved off the timer task. In the meantime increase the stack size to avoid overruns in the thread joiner. Also enable the option configCHECK_FOR_STACK_OVERFLOW, and while we're here also enable configUSE_MALLOC_FAILED_HOOK. These diagnostic options are invaluable for saving debugging time. Since logging uses significant stack space, try to catch stack overflows in the platform LogV(). This fires reliably in OnJoinerTimer prior to enlarging the stack. Fixes #2187 * Reduce timer task memory to 2k * Fix the stack size in EFR32 as well * Add BoltLockManager to manage the lock and unlock request and state Add DataModelHandler to handle bolt actions from the cluster messages Add Gen folder with the files for silicon lab cluster implementation Start a server session for UDP messages Include some mbedtls sources files from gsdk 2.7 in gni . TO BE FIX merge upstream * Add support for Silabs dev board BRD4163A and BRD4164A Merge Upstream into branch Add BoltLockManager to manage the lock and unlock request and state Add DataModelHandler to handle bolt actions from the cluster messages Add Gen folder with the files for silicon lab cluster implementation Strt a server session for UDP messages Include some mbedtls sources files from gsdk 2.7 in gni . TO BE FIX merge upstream Add the IRQ priority init for all EFR32 boards init Restyle some file headers and copyright mentions * Restyled by whitespace * Fix submodules * Format GN files * Clean up & enable Thread on EFR32 * Fix initial thread stack overrun * Fix entropy provider * Restyled by clang-format * Fix openthread commit * Reformat build files gn format $(git ls-files HEAD '*.gn' '*.gni') git add $(git ls-files HEAD '*.gn' '*.gni') Hopefully the last time now that restyled is working. * Format GN files * Apply fixes from master Co-authored-by: jmartinez-silabs <[email protected]> Co-authored-by: jfpenven <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: jmartinez-silabs <[email protected]>
Merge in WMN_TOOLS/matter from provision_si917_flash_only_v2 to silabs_slc_1.3 Squashed commit of the following: commit e1232e7d4be9965bba64739d24afe32d0c325dd8 Author: Ricardo Casallas <[email protected]> Date: Thu Jun 6 15:43:50 2024 -0400 Provision: Si917 Flash-only.
Problem
This commit starts joiner role boot boot so that it can be discovered by commissioners.
Summary of Changes
Start joiner role within 15 minutes on boot.