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
On Cortex-M4F microcontrollers: is fixed point math faster or floating point?
0
3886
views
10
replies
Latest
30 days ago
by
Ronan Synnott
Suggested Answer
Debugging kernel: OS support not working for Linux 5.4
0
Kernel Developers
External Hardware Debug
Debugger
3541
views
5
replies
Latest
1 month ago
by
sgoldschmidt
Suggested Answer
DS-5 bare metal wait error after run "debug"
0
DS-5 Development Studio
Debugging
Arm Compiler 5
Memory
24980
views
14
replies
Latest
1 month ago
by
prasadghole
Suggested Answer
ARM development studio with ARM Juno r2 board
0
Juno Arm Development Platform
Arm Development Studio
Products
Arm Support
3301
views
2
replies
Latest
1 month ago
by
Ronan Synnott
Answered
"Unable to execute remote query (response code 503) " issue
0
3264
views
1
reply
Latest
1 month ago
by
Ronan Synnott
<
>
View all questions in Arm Development Studio forum