How to do coding in multi-core controller ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-15 2:06 AM
I am new to STM32WB, i have written BLE middle-ware application it is working on Scheduler, in main while Loop SCH_Run(~0) is handlling the entire middleware, now i want to wirte the actual application for Cortex-M4 but when i add anything in the While loop my BLE Stack stop working. So kindly guide me how to code in Multi-core controller
- Labels:
-
STM32CubeIDE
-
STM32WB series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-15 3:13 AM
Have you flashed wireless stack on the CPU2?
if yes, then
- How do you register that "BLE Stack stop working"?
- What hardware/software tools do you use for programming/debugging/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-15 4:16 AM
I am using STM32Cube IDE with STM32WB55 nucleo board and i successfully run HandOns from STM32WB MOCC but when i add any thing in While Loop Bluetooth application stops working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-15 4:25 AM
If literally anything added to while loop leads to errors, that's confusing. But usually one doesn't need to add any code to the loop explicitly. You should use scheduler to run functions in the loop instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-15 6:38 AM
can u please show me some example of using scheduler for customized function calling??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-15 7:12 AM
app_conf.h
typedef enum
{
CFG_FIRST_TASK_ID_WITH_NO_HCICMD = CFG_LAST_TASK_ID_WITH_HCICMD - 1, /**< Shall be FIRST in the list */
CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID,
/* USER CODE BEGIN CFG_Task_Id_With_NO_HCI_Cmd_t */
/* USER CODE END CFG_Task_Id_With_NO_HCI_Cmd_t */
CFG_LAST_TASK_ID_WITHO_NO_HCICMD /**< Shall be LAST in the list */
} CFG_Task_Id_With_NO_HCI_Cmd_t;
app_entry.c
static void appe_Tl_Init( void )
{
<...>
SCH_RegTask( CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID, shci_user_evt_proc );
<...>
}
void shci_notify_asynch_evt(void* pdata)
{
SCH_SetTask( 1<<CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID, CFG_SCH_PRIO_0);
return;
}
This code is generated by CubeMX.
SCH_RegTask() registers shci_user_evt_proc() function in the scheduler
SCH_SetTask() puts shci_user_evt_proc() in the while loop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-15 9:50 AM
Maybe I was somewhat ambiguous. SCH_SetTask() doesn't really put the function in the loop. It schedules the function to be executed on the next call of the SCH_Run(). Only once. If you need to execute function repeatedly, you need to call SCH_SetTask() repeatedly.
The goal is to call funcions in interrupt handlers, while executing them in the main loop.
