-
Notifications
You must be signed in to change notification settings - Fork 988
Description
Hi
I've changed my project to use FreeRTOS but I run in some issues:
assert(get_core_num() == async_context_core_num(cyw43_async_context));
I'm using SDK V2.2.0 that includes the fix from raspberrypi/pico-sdk#1526.
The config file looks like
#if FREE_RTOS_KERNEL_SMP // set by the RP2xxx SMP port of FreeRTOS
/* SMP port only */
#ifndef configNUMBER_OF_CORES
#define configNUMBER_OF_CORES 2
#endif
#define configNUM_CORES configNUMBER_OF_CORES
#define configTICK_CORE 0
#define configRUN_MULTIPLE_PRIORITIES 1
#if configNUMBER_OF_CORES > 1
#define configUSE_CORE_AFFINITY 1
#endif
#define configUSE_PASSIVE_IDLE_HOOK 0
#endif
this is the recommendation from raspberrypi/pico-sdk#2101 and #428
The behaviour is very strange: sometimes it works, but then it asserts all time (after reboot dev pc, pico debug probe or the pico itself) - nothing works. I've observed that there is also no core affinity - sometimes it asserts on core0 and sometime on core1.
Call-Stack:
_exit@0x100045b0 (c:\Users\paber.pico-sdk\sdk\2.2.0\src\rp2_common\pico_clib_interface\newlib_interface.c:45)
__assert_func@0x10004688 (c:\Users\paber.pico-sdk\sdk\2.2.0\src\rp2_common\pico_clib_interface\newlib_interface.c:173)
cyw43_irq_init@0x1001a3e4 (c:\Users\paber.pico-sdk\sdk\2.2.0\src\rp2_common\pico_cyw43_driver\cyw43_driver.c:65)
handle_sync_func_call@0x1001a70e (c:\Users\paber.pico-sdk\sdk\2.2.0\src\rp2_common\pico_async_context\async_context_freertos.c:225)
async_context_base_execute_once@0x1000931a (c:\Users\paber.pico-sdk\sdk\2.2.0\src\rp2_common\pico_async_context\async_context_base.c:101)
process_under_lock@0x1001a814 (c:\Users\paber.pico-sdk\sdk\2.2.0\src\rp2_common\pico_async_context\async_context_freertos.c:49)
async_context_task@0x1001a8fa (c:\Users\paber.pico-sdk\sdk\2.2.0\src\rp2_common\pico_async_context\async_context_freertos.c:72)
xPortPendSVHandler@0x10004ff8 (c:\GitRepo\WordClock\lib\FreeRTOS-Kernel\portable\ThirdParty\GCC\RP2040\port.c:614)
I'm using FreeRTOS V10.4.0-kernel-only as a submodule.
Any Ideas?
Best regards
Patrick