The webinar recording can be accessed at the link below:
Embedded devices are being connected to the internet at a dizzying rate. Successfully creating an IoT device requires developers to master their RTOS and debugging techniques in addition to learning about internet connectivity. In this webinar, attendees will learn about advanced RTOS application design techniques using ThreadX that include how to properly manage memory, use event chaining and setup an embedded connection to Amazon Web Services (AWS). We will also use Percepio Tracealyzer to learn how to trace our IoT application to not just understand how it’s performing but also to debug the application. Attendees will learn how to create user events and monitor the state of their TCP/IP stack.
This webinar will utilize hands-on demonstrations using ThreadX and Percepio Tracealyzer with source code being readily available for attendees.
Topics Covered in this Webinar Include:
• RTOS application design to connect to the internet
• Setting up and debugging a TCP/IP stack
• How to use preemption threshold to minimize thread starvation
• Utilizing event chaining to improve application performance
• Reducing debugging time using application tracing with Percepio Tracealyzer
• How to setup custom user events in Percepio Tracealyzer
• Examining TCP/IP stack behavior and generated events
• Best practices for using advanced RTOS techniques in IoT devices
Access the webinar recording below:
Below are the questions that were asked during the webinar along with the answers to those questions. Feel free to post further questions as comments to this post.
|Can the tracelyzer give information on prioritization thresholds for threadx? Like trying to focus in on blockers to do with resources or CPU starvation?||You could setup a user event that transmits the threshold values for the thread. This is not something that is automatically monitored by the events within ThreadX.|
|hi, how i can add to my cv or linkedin profile i follow this webinar ?||You just put the webinar title that you attended it. I will also post it to my blog tomorrow @ beningo.com and you can link to it there.|
|I have a question regarding low power consumption management in an RTOS espicially for battery powered IOT device. Can you give us some info on that ?||Yes. For low-power, you can use a feature such as tickless mode. You can also use the idle task to put the system into a low power mode and use the system tick or an external event to wake the system up.|
|this is allready the new tracealyzer 4?||this is still Tracealyzer 3. Tracealyzer 4 for ThreadX I’m told will be out in April.|
|What is the scheduling algorithm of the RTOS?is it EDF,DM,RM,COOP?||Pre-emptive and then same priorities can be configured for cooperative or round robin|
|At what frequency are we sending the data ?||The data is being updated every 5 seconds|
|ok seems i never found the communication view in my tracealyzer…||ah! It’s a good one! It was cropped on the screen, but there is statistical information about the communication as well off to the right.|
|why in tryce analayzer the task with low priority prempted the thask with higher priorty ? it was not real time ?||a low priority thread would not be able to preempt a higher priority thread. The trace I showed was just an example trace that is provided with tracealyzer.|
|Can you please recommend any free resources for teaching RTOS ?||I don’t know of any good free resources that would provide a complete picture. However, for low cost, you could purchase a few books such as, Real-Time Concepts for Embedded Systems, An Embedded Software Primer, Multitasking using ThreadX. These are all great resources. I would also purchase a low-cast Reneas Synergy board that would allow you to play with a commerical RTOS and software stack.|
|Is there any limitation of memory region for memory pool? Is it applicable both for RAM and ROM region?||Memory pools are designed to be used with RAM. So you are allocating dynamic RAM during run-time. The only limitation is the available RAM on the MCU|
|Tracing: What about applications without RTOS?||Without an RTOS, you would need to integrate the Event Recorder library yourself and then add user events through-out your code in order to get trace data.|
|What is the reason for non-deterministic behaviour of memory pools? Is it because of the way heap is structured like like linked lists?||It is only byte memory pools that have the issue. It comes down to having to search through the byte pool for the first available continugous block that meets the required space.|
|Does other Renesas board provide the opportunity to access the cloud services like shown in the demo application?||Yes you can do it with any of their boards. The example application is currently written for their AE-CLOUD1 board but it could be adapted for other boards.|
|What is the practical application of Event Chaining in RTOS?||When you need to notify multiple threads that an event has occurred.|
|What is the minimum data buffer requirement to stream trace data over J-Link OB?||The smallest buffer that I have used is 4 kB. It depends on your application, idle time to stream the trace data and how much data you are generating.,The JLink OB is quite slow so for a “normal” system the buffer needs to be larger than normal. The needed size varies so heavily with the application, but generally most people can manage with 4k|
I enjoyed the webinar. One thing I noticed is that the scaling for accelerometer axes seems to be wrong. The magnitude of a static acceleration vector should always be the Earth’s gravity, 1g, but this isn’t the case with the values on the dashboard.
Thanks! It’s possible that the board was not completely level. While it was sitting on my bench, the bench may not be level. I’ll have to look and see how far off it was. In any event, it was how the demo behaved out of the box. Thanks for pointing this out.
Thanks for the quick response! It’s not about the board being level, it’s about the ‘magnitude’ of the acceleration vector irrespective of direction, i.e. (x^2 + y^2 + z^2)^0.5 = 1g. One easy clue is that none of the individual axes can be >1g for example. The only reason I spotted this is because I’ve worked with accelerometers before and it immediately stood out as being wrong.