Hallo,
uP: ATxmega32A4 @8MHz (external)
Debugger: JTAGICE3 on PDI @1MHz
Entwicklungsumgebung: AVR Studio 5.1
Meine UART RX ISR wird nicht ausgelöst wenn ich das Programm wie folgt
laufen lasse:
1 | #include <avr/io.h>
|
2 | #include "Initialisation/SysInit.h"
|
3 | #include <avr/interrupt.h>
|
4 | #include "Ordner/Func.h"
|
5 |
|
6 | ISR(USARTE0_RXC_vect)
|
7 | {
|
8 | asm("nop");
|
9 | }
|
10 |
|
11 | int main(void)
|
12 | {
|
13 | SysInit(); //Enthält Clock, UART, Interrupt usw
|
14 |
|
15 | func();
|
16 |
|
17 | }
|
wenn ich jedoch das Programm um eine Endlosschleife (while(1);) VOR der
func() ergänze wird die ISR ausgeführt:
1 | #include <avr/io.h>
|
2 | #include "Initialisation/SysInit.h"
|
3 | #include <avr/interrupt.h>
|
4 | #include "Ordner/Func.h"
|
5 |
|
6 | ISR(USARTE0_RXC_vect)
|
7 | {
|
8 | asm("nop");
|
9 | }
|
10 |
|
11 | int main(void)
|
12 | {
|
13 | SysInit(); //Enthält Clock, UART, Interrupt usw
|
14 | while(1);
|
15 | func();
|
16 |
|
17 | }
|
Die Funktion "func()" ist eine noreturn-Funktion und befindet sich in
einem Unterodner (läuft auch sauber).
Selbst wenn ich die ISR in das File der func()-Funktion stecke passiert
nichts, bis ich irgendwo eine Endlosschleife einbaue...
Was ist das Problem?
Freundliche Grüsse
Rob