ThreadX Patch for WICED SDK-3.1.x
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Here is a patch for ThreadX for WICED SDK-3.1.x version.
The following is the patch for .../WICED/RTOS/ThreadX/WWD/wwd_rtos.c:
@@ -84,7 +84,7 @@ wwd_result_t host_rtos_create_thread_with_arg( /*@out@*/ host_thread_type_t* thr
tx_thread_stack_error_notify( wiced_threadx_stack_error_handler );
#endif /* ifdef DEBUG */
- status = tx_thread_create( thread, (char*) name, (void(*)( ULONG )) entry_function, arg, stack, (ULONG) stack_size, (UINT) priority, 0, TX_NO_TIME_SLICE, (UINT) TX_AUTO_START );
+ status = tx_thread_create( thread, (char*) name, (void(*)( ULONG )) entry_function, arg, stack, (ULONG) stack_size, (UINT) priority, (UINT) priority, TX_NO_TIME_SLICE, (UINT) TX_AUTO_START );
return ( status == TX_SUCCESS ) ? WWD_SUCCESS : WWD_THREAD_CREATE_FAILED;
}
@@ -266,7 +266,7 @@ wwd_result_t host_rtos_delay_milliseconds( uint32_t num_ms )
else
{
uint32_t time_reference = host_platform_get_cycle_count( );
- int32_t wait_time = (int32_t)num_ms * CPU_CLOCK_HZ / 1000;
+ int32_t wait_time = (int32_t)num_ms * (int32_t)CPU_CLOCK_HZ / 1000;
while ( wait_time > 0 )
{
uint32_t current_time = host_platform_get_cycle_count( );
The .../WICED/RTOS/ThreadX/WWD/wwd_rtos.c source file is also attached.
- Subscribe to RSS Feed
- Mark Article as New
- Mark Article as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Hi Seyhan,
Can you explain a bit about the changes?
Line 14/15 is to fix host_rtos_delay_milliseconds().
What is the purpose of line 05/06?
I mean what's the user visible impact with this change?
Thanks.
- Subscribe to RSS Feed
- Mark Article as New
- Mark Article as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
I had problem with this delay at the ThreadX
It is good.
- Subscribe to RSS Feed
- Mark Article as New
- Mark Article as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Without explaining what problem the patch solves, leads me to ask:
- does the same problem exist in SDK 2.4.1 (which some of us are stuck on for the STM32F1xx support)?
- if so, will a patch be released, and when?
Susan
- Subscribe to RSS Feed
- Mark Article as New
- Mark Article as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Hi,
The change is a fix in the Threadx priorities.
To be more specific its the preempt threshold, its now changed from 0 to be the priority, so as to make more the priority of threads and match behaviour of other operating systems