Arm Community
Site
Search
User
Site
Search
User
Groups
Arm Research
DesignStart
Education Hub
Graphics and Gaming
High Performance Computing
Innovation
Multimedia
Open Source Software and Platforms
Physical
Processors
Security
System
Software Tools
TrustZone for Armv8-M
中文社区
Blog
Announcements
Artificial Intelligence
Automotive
Healthcare
HPC
Infrastructure
Innovation
Internet of Things
Machine Learning
Mobile
Smart Homes
Wearables
Forums
All developer forums
IP Product forums
Tool & Software forums
Pelion IoT Platform
Support
Open a support case
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Developer Community
Tools and Software
Software Tools
Jump...
Cancel
Software Tools
Arm Development Studio forum
CMSIS RTOS RTX invalid thread id token ?
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
4 replies
Subscribers
127 subscribers
Views
3121 views
Users
0 members are here
Related
CMSIS RTOS RTX invalid thread id token ?
Offline
Mike Davies
over 7 years ago
Note: This was originally posted on 8th August 2012 at http://forums.arm.com
Hi,
I am using Keil's RTX implementation of the CMSIS RTOS and need to communicate between an interrupt routine and a thread. I intend to use the osSignalSet() call for this which the documentation says is suitable for use in an interrupt routine. This function takes an osThreadId parameter which I intend to store in a global variable for access by the ISR and will set it from the thread.
My question relates to interrupts that might conceivably occur before the creation of the thread : I need a default value to use for the osThreadId which can never occur as a real thread id. Obviously Keil's RTX comes complete with source and I am pretty sure "NULL" is a suitable value but the CMSIS RTOS documentation states that the implementation of osThreadId is implementation defined so I cannot rely on this being always true. I have looked up and down "cmsis_os.h"but cannot find any #define like GUARANTEED_INVALID_THREAD_ID, so can anyone tell me whether this is an oversight in CMSIS RTOS, or am I missing something ?
Also, while I am here, my use above of a global variable to communicate data between an ISR and a thread is quite common but very ugly. I am new to ARM Cortex and I wondered if there is anything I am missing in terms of alternatives ? I am reminded of the early days of Windows when Windows drivers communicated with DOS counterparts via software interrupts in an arrangement like a kind of multi-level dumb waiter, I can't remember what they called that arrangement but is there anything in the Cortex that would allow a similar scheme to work ?
Many thanks,
Mike
More questions in this forum
By title
By date
By reply count
By view count
By most asked
By votes
By quality
Descending
Ascending
All recent questions
Unread questions
Questions you've participated in
Questions you've asked
Unanswered questions
Answered questions
Questions with suggested answers
Questions with no replies
Suggested Answer
DS52020.0 connection to Musca-A/B boards not working
0
Arm Development Studio
Musca-A
593
views
3
replies
Latest
12 hours ago
by
Ronan Synnott
Suggested Answer
Positioning a function in a Position Independent Executable for ARMV8
0
1986
views
3
replies
Latest
9 days ago
by
Stephen Theobald
Answered
Link a pure binary file to image with scatter file
0
1953
views
3
replies
Latest
9 days ago
by
Ronan Synnott
Answered
Failed to read contents of Internal RAM L1-I_DATA in ARM DS
0
Arm Development Studio
Cache
Debug and Trace Services Layer (DTSL)
4614
views
23
replies
Latest
22 days ago
by
Boon Khai
Suggested Answer
DS-5 connect fail when cortex-r5 is in lock-step mode
0
4221
views
10
replies
Latest
29 days ago
by
Stuart Hirons
>
View all questions in Arm Development Studio forum