Fujitsu MB91460 SERIES 애플리케이션 노트 - 페이지 16

{카테고리_이름} Fujitsu MB91460 SERIES에 대한 애플리케이션 노트을 온라인으로 검색하거나 PDF를 다운로드하세요. Fujitsu MB91460 SERIES 26 페이지. 32-bit microcontroller
Fujitsu MB91460 SERIES에 대해서도 마찬가지입니다: 사용자 설명서 (45 페이지), 시작하기 (41 페이지), 애플리케이션 노트 (23 페이지), 애플리케이션 노트 (29 페이지), 애플리케이션 노트 (29 페이지)

Fujitsu MB91460 SERIES 애플리케이션 노트

3.3 Reading an Interrupt Level

If the currently configured level of the peripheral can be read by reading out the
corresponding ICR.
/* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
/* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
/* ELIGIBILITY FOR ANY PURPOSES.
/*
/*---------------------------------------------------------------------------*/
unsigned int
icr_rlt01;
void
readIrqLevel(void)
{
icr_rlt01 = ICR;
}

3.4 Interrupt Service Routine

The type qualifier __interrupt notifies the complier that the function has to be finished
with the RETI instruction. This function is always of the type of void and has no arguments.
Please note that the Interrupt flag should be always cleared in the interrupt service routine;
otherwise the service routine will be entered again after execution. Most of the resources
have a special Interrupt clear bit, but some have an auto-clear by accessing a special
register (e. g. UART read buffer).
The following code shows a typical Interrupt service routine.
/* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
/* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
/* ELIGIBILITY FOR ANY PURPOSES.
/*
/*---------------------------------------------------------------------------*/
__interrupt
void
My_Interrupt_Service_Routine_1(void)
{
Resource_Interrupt_Clear_Bit = 0;
/* do something here */
}

3.5 Interrupt Service Routine without Register Saving

If the application requires that after entering certain interrupt service routine if the stack
should not be affected (by pushing CPU internal registers) then such ISR should be written
in assembly.

3.6 Setting global Interrupt Level

To set the global Interrupt Level via the ILM register, the language extension __set_il(n)
exists, where n is the global level. Please also see 2.5.1.1.
Assume the level 20 is desired. The following code shows how to access the ILM register
from C code.
MCU-AN-300055-E-V10
INTERRUPTS
Chapter 3 Interrupt Recommendations and Examples
(C) Fujitsu Microelectronics Europe GmbH
(C) Fujitsu Microelectronics Europe GmbH
/* clear Interrupt cause */
- 16 -
© Fujitsu Microelectronics Europe GmbH
*/
*/
*/
*/