Hi! I am implementing timer, serial rx, serial tx, and adc interrupts on the DSP56F807. I was able to get rx, tx, adc, pwm, and timer working just off flags, but it needs to be faster, hence the move to interrupts.
My question is on implementing serial port interrupts. I was able to get the TimerA interrupt working just fine right away, it was very straightforward extension of the example code included with CodeWarrior. However, I can't get either the serial receive full or transmit ready interrupts to work, following the same method.
Here is what I did:
- Insert the name of my function into the pROM and pRAM files (FcpmRxIsr).
- Initialize the serial port to trigger the interrupt. 0x002C in the CR register. We run the ServoPod at 20MHz (F413 in PLLDB), so for 9600 baud we put 0x0082 in the BR register.
- Write interrupt service routine, put #pragma interrupt before the declaration in the .c file. Leave declaration as usual in the .h file. Right now all my isr does is read the SCI0DR register into a variable.
- Run main. Main checks if the variable changes. If it changed, break from loop.
It doesn't break from the loop, yet when I pause the program, it usually stops inside the RxFull isr code. So it does trigger the isr, yet the variable is either never updated or something keeps it from returning to main().
I feel I forgot to initialize something, or some small issue like that. I've gone through the user manual multiple times already, though, trying to find what I've missed. Please help! Thank you very, very much. Let me know if you need any more information.