你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

STM8中断优先级不够的问题

[复制链接]
lm_cloud 提问时间:2017-7-11 15:04 /
STM8L 中,中断优先级通过下面函数设置,但此处仅 ITC_PriorityLevel_1,ITC_PriorityLevel_2,ITC_PriorityLevel_3  总共才3个中断优先级可设置,若我超过3个中断,该怎么设置?



/**
  * @brief  Sets the software priority of the specified interrupt source.
  * @note   The modification of the software priority is only possible when
  *         the interrupts are disabled.
  * @note   The normal behavior is to disable the interrupt before calling
  *         this function, and re-enable it after.
  * @note   The priority level 0 cannot be set (see product specification
  *         for more details).
  * @param  IRQn : Specifies the peripheral interrupt source.
  * @param  ITC_PriorityLevel : Specifies the software priority value to set
  *          This parameter can be one of the following values:
  *            @arg ITC_PriorityLevel_0: Software priority level 0 (cannot be written)
  *            @arg ITC_PriorityLevel_1: Software priority level 1
  *            @arg ITC_PriorityLevel_2: Software priority level 2
  *            @arg ITC_PriorityLevel_3: Software priority level 3     
  * @retval None
  */
void ITC_SetSoftwarePriority(IRQn_TypeDef IRQn, ITC_PriorityLevel_TypeDef ITC_PriorityLevel)
{


}




收藏 评论2 发布时间:2017-7-11 15:04

举报

2个回答
lm_cloud 回答时间:2017-7-11 16:50:59
分硬件优先级和软件优先级,没设置软件优先级的默认为硬件的优先级
sssdd 回答时间:2017-7-24 10:37:59
实际上相同优先级的会顺序响应。不是说每个中断要有独立的优先级。理解错了啊。
所以,这么几个优先级就够了。
优先级的含义是,可以打断低优先级的中断。实际上不允许你嵌套太多的中断。非常费堆栈。
关于意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
招聘信息
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
关注我们
st-img 微信公众号
st-img 手机版