Fujitsu MB91460 SERIES Catatan Aplikasi - Halaman 26

Jelajahi secara online atau unduh pdf Catatan Aplikasi untuk Motherboard Fujitsu MB91460 SERIES. Fujitsu MB91460 SERIES 29 halaman. 32-bit microcontroller
Juga untuk Fujitsu MB91460 SERIES: Panduan Pengguna (45 halaman), Memulai (41 halaman), Catatan Aplikasi (23 halaman), Catatan Aplikasi (26 halaman), Catatan Aplikasi (29 halaman)

Fujitsu MB91460 SERIES Catatan Aplikasi
void
Init_LED (void)
{
DDR16 = 0xff;
PFR16 = 0x00;
PDR16 = 0x00;
}
void
main(void)
{
__EI();
__set_il(31);
InitIrqLevels();
PORTEN = 0x3;
Init_LED();
Init_DMAC();
Init_UART2();
while(1)
{
HWWD_CL = 0;
}
}
__interrupt
void
DMAIRQHandler (void)
{
if(DMACB0_DSS1 == 1 && DMACB0_DSS0 == 1)
{
DMACB0_DSS = 0;
PDR16 = 0xff;
}
}
Vectors.c
Please note, that the corresponding interrupt vector and level has to be defined in the
vectors.c module of our standard template project.
/* 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.
/*
/*---------------------------------------------------------------------------*/
void
InitIrqLevels(void)
{
. . .
ICR63 = 20;
. . .
}
__interrupt
void
DMAIRQHandler (void);
. . .
#pragma intvect DMAIRQHandler
. . .
MCU-AN-300059-E-V11
DIRECT MEMORY ACCESS
Chapter 3 DMAC Examples
// port as output
// use GPIO function
// all LEDs off
// enable interrupts
// allow all levels
// init interrupts
// enable I/O Ports
// This feature is not supported by MB91V460A
// For all other devices the I/O Ports must be enabled
// Initialize led port
// Initialize DMAC
// Initialize UART2
// endless loop
(C) Fujitsu Microelectronics Europe GmbH
// DMA Controller
// Main/Sub OSC stability wait
142
// Normal End
// clear DMA channel status
// Glow all LEDs connected at Port16
// Prototype
// DMA Controller
- 26 -
© Fujitsu Microelectronics Europe GmbH
P
*/
*/