參數(shù)資料
型號: 29K_SUPMODE
英文描述: Am29030 and Am29035 Microprocessors Defining a Trap to Switch to Supervisor Mode
中文描述: Am29030和Am29035微處理器定義一個陷阱,以切換到管理員模式
文件頁數(shù): 1/2頁
文件大?。?/td> 59K
代理商: 29K_SUPMODE
PID No. 18416A/0
1 of 2
AMD
29K
Family
Technical
Bulletin
EPD Technical Support Hotline
Defining a Trap to Switch to Supervisor Mode
April 28, 1994
Purpose
This bulletin explains how to place a 29K Family
microprocessor or microcontroller in supervisor
mode.
Affected Parts
The information in this bulletin affects the following
parts:
Device
Am29000, Am29005, Am29030,
Am29035, and Am29050
microprocessors
Revision
All
Am29200, Am29205, Am29240,
Am29243, and Am29245
microcontrollers
All
Supervisor Mode
To switch a 29K Family processor to supervisor
mode, the SM bit in the Current Processor Status
(CPS) register must be set. But because the CPS
register is a protected special-purpose register, it may
not be modified when the processor is running in user
mode.
However, when a trap is taken in a 29K Family
processor, the processor is placed in supervisor mode.
Because of this behavior, a user-defined trap can be
used to switch the processor to supervisor mode.
Switching to Supervisor Mode
The
settrap()
host interface (HIF) service can be
used to define a trap. At this point, you are in
supervisor mode. However, you need the processor to
remain in supervisor mode when returning from the
trap.
Remaining in Supervisor Mode
When a trap is taken, a 29K Family processor copies
the contents of the CPS register into the Old
Processor Status (OPS) register. On return from this
trap, the processor copies the contents of the OPS
register into the CPS register.
So, if the user-defined trap sets the SM bit in the OPS
register, the contents of OPS are copied into the CPS
register on return from the trap. This keeps the
processor in supervisor mode after returning from the
trap.
Example Code
The following example consists of two files, one
written in C (
trapit.c
) and the other written in 29K
Family assembly language (
mytrap.s
). The file
written in C contains the call to
settrap()
used to
install the trap handler that sets the SM bit. Once the
trap handler has been installed, an assembly language
routine is called that will cause the newly installed
trap to be asserted. Any code that is executed after
this user-defined trap is asserted will execute in
supervisor mode.
The 29K assembly language file contains the source
code for the user-defined trap handler as well as a
function that, when called, will cause the user defined
trap to be asserted.
trapit.c
#include <stdio.h>
#include <hif.h>
extern void super_mode(void);
extern void as70(void);
void howdy() {
int i;
for(i=0;i<=10;i++)
printf("Hello!\n");
}
main() {
_settrap(70,&super_mode);
as70();
howdy();
}
相關(guān)PDF資料
PDF描述
29KPROG 5-Pin, Multiple-Input, Programmable Reset ICs
29W040 4 Mbit 512Kb x8, Uniform Block Low Voltage Single Supply Flash Memory
2A-50C RADIATION HARDENED HIGH EFFICIENCY, 5 AMP SWITCHING REGULATORS
2A01-T 2.0A RECTIFIER
2A02-T 2.0A RECTIFIER
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
29L06 制造商:CLARKSON 功能描述:CSN HSS SCRW/SHK RNDG CUTTER 3MM
29L10 制造商:CLARKSON 功能描述:CSN HSS SCRW/SHK RNDG CUTTER 5MM
29L102C 功能描述:固定電感器 1.0uH 4.6A Shielded SMD RoHS:否 制造商:AVX 電感:10 uH 容差:20 % 最大直流電流:1 A 最大直流電阻:0.075 Ohms 工作溫度范圍:- 40 C to + 85 C 自諧振頻率:38 MHz Q 最小值:40 尺寸:4.45 mm W x 6.6 mm L x 2.92 mm H 屏蔽:Shielded 端接類型:SMD/SMT 封裝 / 箱體:6.6 mm x 4.45 mm
29L103C 功能描述:固定電感器 10uH 1.55A Shielded SMD RoHS:否 制造商:AVX 電感:10 uH 容差:20 % 最大直流電流:1 A 最大直流電阻:0.075 Ohms 工作溫度范圍:- 40 C to + 85 C 自諧振頻率:38 MHz Q 最小值:40 尺寸:4.45 mm W x 6.6 mm L x 2.92 mm H 屏蔽:Shielded 端接類型:SMD/SMT 封裝 / 箱體:6.6 mm x 4.45 mm
29L104C 功能描述:固定電感器 100uH 480mA Shielded SMD RoHS:否 制造商:AVX 電感:10 uH 容差:20 % 最大直流電流:1 A 最大直流電阻:0.075 Ohms 工作溫度范圍:- 40 C to + 85 C 自諧振頻率:38 MHz Q 最小值:40 尺寸:4.45 mm W x 6.6 mm L x 2.92 mm H 屏蔽:Shielded 端接類型:SMD/SMT 封裝 / 箱體:6.6 mm x 4.45 mm