REXIS is both ImageCraft’s RTOS and a component of the JumpStart IoT Connectivity Suite. It’s easy to use and also supports multiple APIs for IPC (Inter-Process Communication). In this post, we aim to show how easy it is to write an interrupt handler to interact with a normal REXIS task.
Problem Description: in an embedded system, the most efficient method of detecting sensor and other data input is through peripheral interrupts. An interrupt handler, or Interrupt Service Routine (ISR), is called when the hardware device receives data (e.g.: a character arrives at a UART receive register). The ISR reads the data from the hardware device, and the data can then be processed by the firmware. Because interrupts preempt other code from running, to minimize performance impact on the rest of the system the ISR should do its job as quickly as possible and leave the more complex data processing to code that is not running in an interrupt context.
Why is this important? While the example in this post is trivial in nature (basically, it’s a terminal I/O echo program), it demonstrates one of the most important aspects of using an RTOS: use an ISR to handle a hardware event, and then pass the data to a normal task for data processing.Continue reading