Fujitsu MB91460 SERIES Nota de aplicación - Página 26

Navegue en línea o descargue pdf Nota de aplicación para Placa base Fujitsu MB91460 SERIES. Fujitsu MB91460 SERIES 29 páginas. 32-bit microcontroller
También para Fujitsu MB91460 SERIES: Manual del usuario (45 páginas), Primeros pasos (41 páginas), Nota de aplicación (23 páginas), Nota de aplicación (26 páginas), Nota de aplicación (29 páginas)

Fujitsu MB91460 SERIES Nota de aplicación
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
*/
*/