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. GBDT理解

    一.提升树 提升方法实际采用加法模型(即基函数的线性组合)与前向分布算法.以决策树为基函数的提升方法称为提升树,boosting tree.对分类问题的决策树是二叉分类树,对回归问题的决策树是二叉回归 ...

  2. 【逆向工具】IDA Python安装与使用

    1.IDA Pyhon介绍 IDA Python是IDA6.8后自带插件,可以使用Python做很多的辅助操作,非常方便的感觉. 2.IDA Python安装 从github上IDAPython项目获 ...

  3. 各种initcall的执行先后顺序(module_init、postcore_initcall、arch_initcall、subsys_initcall、 fs_initcall)【转】

    转自:http://www.cnblogs.com/superlcc/archive/2012/09/12/2681930.html 现在以module_init为例分析initcall在内核中的调用 ...

  4. mac lsof使用查看端口

    安装 brew install lsof 在Mac OS系统中,无法使用netstat来查看端口占用情况,可以使用lsof来代替,这种方式在Linux下也适用. sudo lsof -nP -iTCP ...

  5. linux如何查看端口被哪个进程占用?

    参考:https://jingyan.baidu.com/article/546ae1853947b71149f28cb7.html 1.lsof -i:端口号 2.netstat -tunlp|gr ...

  6. WCF开发中将net.tcp协议寄宿到IIS的方法

    1 部署IIS 1.1 安装WAS IIS原本是不支持非HTTP协议的服务,为了让IIS支持net.tcp,必须先安装WAS(Windows Process Activation Service),即 ...

  7. 网络抓包神器-Charles使用指南

    http://blog.csdn.net/liulanghk/article/details/46342205 目录 概述 安装 显示模式 PC端抓包 移动应用抓包 其他技能 charles使用问题汇 ...

  8. POJ 3281 Dining(最大流+拆点)

    题目链接:http://poj.org/problem?id=3281 题目大意:农夫为他的 N (1 ≤ N ≤ 100) 牛准备了 F (1 ≤ F ≤ 100)种食物和 D (1 ≤ D ≤ 1 ...

  9. MyISAM引擎和InnoDB引擎的特点

    随着MySQL的不断更新,由于各存储引擎功能特性差异较大,这篇文章主要是介绍如何来选择合适的存储引擎来应对不同的业务场景,朋友们可以根据业务需求,选择合适的存储引擎.^.^ MyISAM 特性 不支持 ...

  10. Tomcat启动默认访问项目

    一般有两种可以实现:推荐使用这一种.更灵活 一般项目的编译项目都在Tomcat的webapps下,项目的访问路径一般为:http://localhost:8080/项目虚拟路径.但是Tomcat的默认 ...