- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I'm trying to make an RTOS application run, with a single thread. Here is snippet of my code
#include "wiced_rtos.h"
/******************************************************************************
* Constants
******************************************************************************/
#define THREAD_PRIORITY 10
#define THREAD_STACK_SIZE 1024
/******************************************************************************
* Function Definitions
******************************************************************************/
void ledThread(uint32_t arg)
{
while(1)
{
WICED_BT_TRACE("**** welcome aboard buddy **** \n\r");
wiced_rtos_delay_microseconds(5 * 1000);
}
}
*
* Entry point to the application. Set device configuration and start BT
* stack initialization. The actual application initialization will happen
* when stack reports that BT device is ready.
*/
APPLICATION_START()
{
wiced_result_t err;
wiced_set_debug_uart(WICED_ROUTE_DEBUG_TO_PUART);
wiced_thread_t* p_thread;
p_thread = wiced_rtos_create_thread();
err = wiced_rtos_init_thread(p_thread,THREAD_PRIORITY,NULL,ledThread,THREAD_STACK_SIZE, NULL);
WICED_BT_TRACE("**** Thread has been created %d **** \n\r",err);
}
Function wiced_rtos_init_thread() returns err = 15, which indicates some kinda Thread error. I'm not being able to figure it out, what's wrong.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ashish,
Could you please try create the thread in BTM_ENABLED_EVT after calling the wiced_bt_stack_init?
I have attached one example project. You may refer to the sample code.
Thanks & Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content