硬汉嵌入式论坛

 找回密码
 立即注册
查看: 4401|回复: 2
收起左侧

[有问必答] 关于M4的CONTROL寄存器

[复制链接]

23

主题

101

回帖

170

积分

初级会员

积分
170
发表于 2017-7-15 16:48:08 | 显示全部楼层 |阅读模式
求教大神,M4如果开启了FPU后,那么CONTROL[2]这一位是一直为1吗?还是有时也会为0?
回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
117586
QQ
发表于 2017-7-15 17:07:21 | 显示全部楼层
开启了不行,得使用了相应浮点指令才会被置位

权威指南中的说明是这样的
FPCA bit in the CONTROL register: CONTROL.FPCA indicates if the current context (e.g., task) has a floating point operation. It is:
• Set to 1 when the processor executes a floating point instruction
• Cleared to zero at the beginning of an exception handler
• Set to the inverse of bit 4 in EXC_RETURN at exception return
• Cleared to zero after a reset

QQ截图20170715170422.png
回复

使用道具 举报

23

主题

101

回帖

170

积分

初级会员

积分
170
 楼主| 发表于 2017-7-16 09:00:29 | 显示全部楼层

回 eric2013 的帖子

eric2013:开启了不行,得使用了相应浮点指令才会被置位

权威指南中的说明是这样的
FPCA bit in the CONTROL register: CONTROL.FPCA indicates if the current context (e.g., task) has a floating point operation. It is:
• Set to 1 when the processor executes a floating poi .. (2017-07-15 17:07) 
[s:151],看来还是得多看权威指南
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2025-8-17 06:56 , Processed in 0.038432 second(s), 27 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

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