Timer IRQ on the 68k

I'm trying to get a function being executed at a regular interval on the 68k by using the interrupt control on the SCSP, but it's not working properly right now.

Here's basically the way I'm setting it up:

I put my interrupt vector at address 0x78 in the 68k binary.

// Set level 6 for the timer A interrupt

SCILV0 = 0x00;

SCILV1 = 0x40;

SCILV2 = 0x40;

// Enable timer A interrupts

SCIEB = 0x40;

// Set up timer A (should expire every ~23ms?)

TIMA = 0;

TACTL = 2;

The function I specified with the interrupt vector never seems to be executed though. Are there any additional steps necessary that I've missed?
 
mic said:
The function I specified with the interrupt vector never seems to be executed though. Are there any additional steps necessary that I've missed?
I feel kind of silly asking this, but you never mentioned enabling interrupts on the 68K itself (with the CLI instruction). Have you done that?
 
ExCyber said:
I feel kind of silly asking this, but you never mentioned enabling interrupts on the 68K itself (with the CLI instruction). Have you done that?

More like "move.w #$2000, sr". :D If you read SCIPD are there any interrupts pending, even though they never get taken? Can you force a CPU software interrupt, or do those not work either? It's been a while but you may need to toggle the reset bit for the timer you are using in SCIRE to kick-start things.
 
I changed the value I initialize SR with from 0x2700 to 0x2100, so now my function appears to be called because I can see some of the sound slot parameters being updated. Unfortunately the rest of the code isn't working properly, so I've still got plenty of debugging to do :eviltongue:
 
Back
Top