查看: 4265|回复: 4

[已解决] LPC54608的ADC阈值触发中断

[复制链接]
  • TA的每日心情
    开心
    2021-4-15 09:26
  • 签到天数: 98 天

    [LV.6]常住居民II

    14

    主题

    187

    帖子

    2

    高级会员

    Rank: 4

    积分
    623
    最后登录
    2021-6-15
    发表于 2018-11-27 21:17:58 | 显示全部楼层 |阅读模式
    近期在研究ADC中断时,发现LPC54608中,有阈值比较功能,按照数据手册上的说明,阈值中断能够触发DMA,但是在验证该功能时,
    阈值中断处理函数能够正常执行,但是DMA一直触发不了,请教各位大神,有没有遇到过这种情况。

    44.6.10 ADC Interrupt Enable register
    There are four separate interrupt requests generated by the ADC: conversion, these are
    -complete or sequence-complete interrupts for each of the two sequences, a
    threshold-comparison out-of-range interrupt, and a data overrun interrupt. The two
    conversion/sequence-complete interrupts can also serve as DMA triggers. The threshold
    and data overrun interrupts share a slot in the NVIC.
    These interrupts may be combined into one request on some chips if there is a limited
    number of interrupt slots. This register contains the interrupt-enable bits for each interrupt.
    In this register, threshold events selected in the ADCMPINTENn bits are described as
    follows:
    Disabled: Threshold comparisons on channel n will not generate an ADC
    threshold-compare interrupt/DMA trigger.
    Outside threshold: A conversion result on channel n which is outside the range
    specified by the designated HIGH and LOW threshold registers will set the channel n
    THCMP flag in the FLAGS register and generate an ADC threshold-compare
    interrupt/DMA trigger.
    Crossing threshold: Detection of a threshold crossing on channel n will set the
    channel n THCMP flag in the FLAGS register and generate an ADC
    threshold-compare interrupt/DMA trigger.



    最佳答案

    ADC 中断可以作为DMA的硬件触发源 [attach]450461[/attach]
    该会员没有填写今日想说内容.
    回复

    使用道具 举报

    该用户从未签到

    656

    主题

    6312

    帖子

    0

    超级版主

    Rank: 8Rank: 8

    积分
    20071
    最后登录
    2024-4-29
    发表于 2018-11-28 10:00:51 | 显示全部楼层
    ADC 中断可以作为DMA的硬件触发源
    2018-11-28_9-58-01.jpg
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2021-4-15 09:26
  • 签到天数: 98 天

    [LV.6]常住居民II

    14

    主题

    187

    帖子

    2

    高级会员

    Rank: 4

    积分
    623
    最后登录
    2021-6-15
     楼主| 发表于 2018-11-28 10:11:59 | 显示全部楼层
    小恩GG 发表于 2018-11-28 10:00
    ADC 中断可以作为DMA的硬件触发源

    您好,我试了一下,ADC的确能够触发DMA,但只是sequence-complete interrupts能触发DMA,阈值中断一直触发不了
    The two conversion/sequence-complete interrupts can also serve as DMA triggers. The threshold
    and data overrun interrupts share a slot in the NVIC.

    请问一下,是不是只有conversion/sequence-complete interrupts才能触发DMA?
    该会员没有填写今日想说内容.
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    656

    主题

    6312

    帖子

    0

    超级版主

    Rank: 8Rank: 8

    积分
    20071
    最后登录
    2024-4-29
    发表于 2018-11-28 10:14:37 | 显示全部楼层
    缘来有你 发表于 2018-11-28 10:11
    您好,我试了一下,ADC的确能够触发DMA,但只是sequence-complete interrupts能触发DMA,阈值中断一直触 ...

    是的
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2021-4-15 09:26
  • 签到天数: 98 天

    [LV.6]常住居民II

    14

    主题

    187

    帖子

    2

    高级会员

    Rank: 4

    积分
    623
    最后登录
    2021-6-15
     楼主| 发表于 2018-11-28 10:25:50 | 显示全部楼层

    我知道了,谢谢
    该会员没有填写今日想说内容.
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /4 下一条

    Archiver|手机版|小黑屋|恩智浦技术社区

    GMT+8, 2024-4-29 19:45 , Processed in 0.147581 second(s), 28 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.

    快速回复 返回顶部 返回列表