the difference between an embOS interrupt and a zero latency interrupt is the interrupt priority level and the usage of OS_EnterInterrupt()/OS_LeaveInterrupt() or OS_EnterNestableInterrupt()/OS_LeaveNestableInterrupt().

Example of an embOS interrupt function:

void OS_COM_IsrHandler(void) {
int Dummy;
OS_EnterNestableInterrupt();
Dummy = US_RHR;
// Call embOS API functions here
OS_LeaveNestableInterrupt();
} void Uart_Init(void) {
OS_ARM_InstallISRHandler(ISR_ID_USART, (OS_ISR_HANDLER*) OS_COM_IsrHandler);
OS_ARM_ISRSetPrio(140); // Set prio > 128
OS_ARM_EnableISR(ISR_ID_USART);
}

Example of a zero latency interrupt function:

void OS_COM_IsrHandler(void) {
int Dummy;
Dummy = US_RHR;
// Never call embOS API functions here
} void Uart_Init(void) {
OS_ARM_InstallISRHandler(ISR_ID_USART, (OS_ISR_HANDLER*) OS_COM_IsrHandler);
OS_ARM_ISRSetPrio(120); // Set prio < 128
OS_ARM_EnableISR(ISR_ID_USART);
}

the difference between an embOS interrupt and a zero latency interrupt的更多相关文章

  1. Reentrant protected mode kernel using virtual 8086 mode interrupt service routines

    A method for allowing a protected mode kernel to service, in virtual 8086 mode, hardware interrupts ...

  2. Interrupt distribution scheme for a computer bus

    A method of handling processor to processor interrupt requests in a multiprocessing computer bus env ...

  3. Java多线程系列--“基础篇”09之 interrupt()和线程终止方式

    概要 本章,会对线程的interrupt()中断和终止方式进行介绍.涉及到的内容包括:1. interrupt()说明2. 终止线程的方式2.1 终止处于“阻塞状态”的线程2.2 终止处于“运行状态” ...

  4. java多线程系类:基础篇:09之interrupt()和线程终止方式

    概要 本章,会对线程的interrupt()中断和终止方式进行介绍.涉及到的内容包括:1. interrupt()说明2. 终止线程的方式2.1 终止处于"阻塞状态"的线程2.2 ...

  5. PIC32MZ tutorial -- Timer Interrupt

    An interrupt is an internal or external event that requires quick attention from the controller. The ...

  6. Intel 80x86 Linux Kernel Interrupt(中断)、Interrupt Priority、Interrupt nesting、Prohibit Things Whthin CPU In The Interrupt Off State

    目录 . 引言 . Linux 中断的概念 . 中断处理流程 . Linux 中断相关的源代码分析 . Linux 硬件中断 . Linux 软中断 . 中断优先级 . CPU在关中断状态下编程要注意 ...

  7. INTERRUPT CONTROLLER

    1,中断的基本概念 CPU与外设之间传输数据的控制方式通常有3种:查询方式,中断方式和DMA方式.查询方式的优点是硬件开销小不需要额外的硬件支持只是通过软件不断的轮询,使用起来也就比较简单,但在此方式 ...

  8. Thread 常搞混的几个概念sleep、wait、yield、interrupt (转)

    原文网址:http://blog.csdn.net/partner4java/article/details/7993420sleep:在指定的毫秒数内让当前正在执行的线程休眠(暂停执行),此操作受到 ...

  9. LKD: Chapter 7 Interrupts and Interrupt Handlers

    Recently I realized my English is still far from good. So in order to improve my English, I must not ...

随机推荐

  1. 第9月第3天 uilabel contentscale

    1. http://blog.csdn.net/u012703795/article/details/43706449

  2. 无锁并发框架Disruptor学习入门

    刚刚听说disruptor,大概理一下,只为方便自己理解,文末是一些自己认为比较好的博文,如果有需要的同学可以参考. 本文目标:快速了解Disruptor是什么,主要概念,怎么用 1.Disrupto ...

  3. rsync更改端口后的同步办法

    rsync有两种常用的认证方式,一种为rsync-daemon方式,另外一种则是ssh. 在一些场合,使用rsync-daemon方式会比较缺乏灵活性,ssh方式则成为首选.但是今天实际操作的时候发现 ...

  4. 【干货】操纵时间 感受威胁 MAC time时间戳视角

    来源:Unit 4: Unix/Linux Forensics Analysis 4.1 Unix/Linux Forensics Analysis MAC Times Sleuthkit工具的MAC ...

  5. mysql high availability 概述

    一.什么是高可用性 1.可用性是指服务不间断运转的时间,通常用百分比来表示,例如 99.999%表示每年最多允许5分钟的宕机时间 2.可用性的效果和开销比例呈线性增长 3.可用性的意义往往也不尽相同, ...

  6. Google Protocol Buffer的安装与.proto文件的定义(转)

    转自(https://www.cnblogs.com/yinheyi/p/6080244.html) 什么是protocol Buffer呢? Google Protocol Buffer( 简称 P ...

  7. Laravel 的 JSON API 接口自动化测试

    Laravel 自带了两种测试类型 Feature Test: 功能测试.针对类似接口这种流程性的测试. Unit Test: 单元测试.针对单个函数这种输入输出结果的测试. 新建一个 Feature ...

  8. android:怎么实现一个控件与另一个指定控件左对齐

    https://segmentfault.com/q/1010000003905460?_ea=425861 针对你这种情况,最简单的一种办法是,设置两个TextView的宽度为固定值,且相等. Li ...

  9. 深入分析几种PHP获取客户端IP的情况转

    转 http://developer.51cto.com/art/200912/166495.htm function getip() { $unknown = 'unknown'; if (isse ...

  10. 【PAT】1060 Are They Equal (25)(25 分)

    1060 Are They Equal (25)(25 分) If a machine can save only 3 significant digits, the float numbers 12 ...