I'm fairly new to the embedded world. I have a little bit of experience on coding firmware for the ARM M0+ based freescale microprocessor. I am current working on a new project using the CML-5282 development board (M5282LITE) and it comes with RTXC Quadros RTOS. I was wondering what is the difference between RTOS and just coding in codewarrior IDE. Do they coexist and RTOS just ease the scheduling? Or can you replace the IDE with RTOS all together? I don't have an idea what RTOS is, please give me any insight I'd appreciate it.
The main difference is the ability of doing multitasking: run more tasks in parallel. This is done by the scheduler, which is the core of the operating system. Since it is a real-time operating system (RTOS) tasks can be scheduled according to some real-time scheduling agorithm. The most popular is fixed priority (i.e., tasks have a static priority and the scheduler always run the task at highest priority).
Different RTOS vary in size and features, but fundamentally an RTOS provides scheduling (typically priority based pre-emptive scheduling) of tasks or threads, synchronisation mechanisms, timers, and interprocess communication.
A typical RTOS is provided as a static link library that you link with your application just like any other library. An IDE is a different thing altogether, although in some cases you get some integration of the RTOS with the IDE with run-time debug tools and (less commonly) thread-level debugging.
An RTOS is a library of code that you will link with your application code. The RTOS provides routines that help you to make a multitasked application. This includes a scheduler and inter-task communications features such as semaphores, queues, and mailboxes.
The RTOS does not replace your IDE. You still need tools for editing, compiling, linking, and debugging your application and that is what the IDE provides. Sometimes the IDE is "RTOS-aware", which means that the debugger provides additional help in debugging your multitask application. For example, it may display RTOS data types such as tasks and semaphores in a easy-to-read way. Or perhaps it supports task-specific breakpoints.
Most embedded systems contain a microcontroller at the center of all these operations. This microcontroller is a single, silicon chip that can be programmed to perform all the operations that your application requires.
This is considerably different than a more advanced microprocessor that is designed to run complex applications. See this article for help deciding if you need a microcontroller or a microprocessor for your project.
While assembly language is closer, it is very specific to the actual underlying hardware, and differs from microcontroller architecture to architecture. C, on the other hand, is much more standardized, while still offering enough control over the underlying hardware.
This CPU runs the set of instructions, or program, that the original human programmer wrote. Closest to the CPU are some registers. These are temporary storage units that have very fast access times matching that of the CPU itself.
Besides the CPU registers, the CPU is also connected to different peripherals such as IO ports, interrupt controllers, timers, USARTS, SPI, I2C, and, in more advanced microcontrollers, video input or output peripherals and memory management units.
The washing machine accepts the user selection for a given washing cycle, which controls things like the water inlet valve, the time period and temperature for the wash and rinse cycles, the water pump that drains the used water etc..
The heap is an area of memory that can be accessed on demand in chunks by the running program, and then returned back when no longer needed, whereby it can be requested again by another part of the running program.
Some microcontrollers also have EEPROM which is also a non-volatile memory type, separate from the flash memory, that is typically used to store user settings or calibration values. Some microcontrollers can actually use a section of flash to do that.
All peripherals have configuration registers, several of them. These are different from the CPU registers, and each peripheral has its own set that can be programmed to make the peripheral behave in a certain way.
The general process is to write the code in an Integrated Development Environment, or IDE, in an embedded language such as C, compile and link the code modules with libraries if used, and download the binary file to the microcontroller for testing and debugging.
To expand on the process just described, the IDE simply provides a convenient, all-in-one platform where the process of actually entering the source code, compiling, linking and loading can be done in one place.
For more advanced firmware programming be sure to check out this article on programming the STM32 32-bit Cortex-M series of microcontrollers from ST Microelectronics. Or see this article on programming the ESP32 series of microcontrollers.
Hi, I'm John Teel, founder of Predictable Designs. Millions of products, including from Apple, use my microchip designs. I also brought my own product to market.
Now my goal is to help entrepreneurs, startups, makers, inventors, and small companies develop and sell new electronic products.
I have a PGA970EVM development kit that I am interfacing with SPI. I noticed that in the SW user manual they mention example FW code but I haven't been able to find it. Could you please link the example code here if possible?
The PGA970 example firmware is included in the mysecure software folder (along with the GUI and the datasheet) that you can request access for at the link that Tom shared. These functions are part of that example firmware. If you already have access to the mysecure software folder, please download the example firmware from that location.
Thanks for your reply.
Here are the contents of the zip file that Tom linked me. There is no firmware as far as I can tell can you let me know if there is a different link that contains the firmware?
After getting suspicious since a zip file with the FW was what I was expecting and I figured you were sending me the FW in some manner, I took a look at what the .exe did for the FW installer and realized the FW was in there and being copied to that directory which is a bit confusing but I could be mistaken. I just wanted to let you know that was the case.
1. I'm not sure what firmware is included in the hex file to be honest. The PGA970 does not come with any firmware installed from the factory. The hex file is likely based on the example firmware, but since the example is mainly only shell functions, there is not much functionality already included.
3. For flashing firmware in a production environment, using the XDS200 with CCS or Uniflash is the preferred method. If you are only evaluating for the moment, you can load a hex file using the USB2ANY through SPI/I2C/OWI. If you need debugging capability, you will have to use the XDS200 with CCS.
Hi, after you connect to you see telemetry in the top of the screen like battery and altitude? As a side note we just released a new version this morning that will highlight the blocks as Tello executes its mission:
Actually Altitude is displaying. I figured out that you need to update the firmware from a phone or iPad?? Cannot use a PC. So I will try that.
Phone says that I am connected to Drone hotspot, but yellow light on drone is not green, just keeps flashing yellow. Cannot update firmware.
Opened app on Samsung phone and downloaded firmware update, but cannot connect to drone now. Sigh. Phone says that I am connected to Drone hotspot, but yellow light on drone is not green, just keeps flashing yellow. Cannot update firmware. Drone getting very hot.
If you upgrade the standby it results in code mismatch which prevents you from being able to intitiate a failover. You then have to reboot the master to upgrade it and the result is 40+ seconds of packet loss.
This involves a reboot of first all slave members, wait for them to come back with code mismatch then the backup master (same, wait until it is up but with code mismatch), and finally the current stack master. Until old stack master is rebooted, the other stack member ports will remain down, but will come back up once the former stack master goes rebooting while the backup master gets (within seconds later) promoted as the new stack master.
From my experience: Do practise this method, so you know how it behaves when you need to do do this. There is a reason why it is not the default upgrade method outlined by Netgear. I've done it now a couple of times on our server stack and core with M4300's but continue with standard full reboot in stacks that are user-facing. It's not perfect, but I can confirm that it works as described. However I always deploy new releases first to less-important stacks first, before updating i.e. the core stack with this staged reboot method.
You'll need to check the currently-configured behavior using "show auto-copy-sw". I honestly don' remember exactly, but you need to make sure the stack doesn't allow automatic downgrades. Otherwise the stack master will try to force-sync the running (old) code.
From my experience the overall failover time has improved and become quite more stable compared to early firmware releases, definitely way less than 40+ seconds as you currently experience. However: The lower the number of ports from my experience, the faster the failover from the old to the new stack master.
For a side node: Even somewhat competing products with stacking, such as HPE/Aruba 2920/30 or Cisco 3850 couldn't do sstaged upgrades for what I've researched. If you cannot afford any ever-so-small downtime within a LAG during an upgrade - unfortunately - the only product I'd see it within Netgear's offering, is the M4500: These don't do stacking, but multi chassis link aggregation groups (MLAG).
MLAG or even higher-end functionalities things like in-service system upgrade is unfortunately often still only found in a pricing realm way above the M4300's and often reserved to datacenter switches. Even the M4500's which are definitely competitively priced compared to other products in their respective space, is quite a bit more expensive compared to even the big M4300-96X.
c80f0f1006