This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

can't get external interrupt work (without dsp/bios)

hi,

i am trying to get an external interrupt work without DSP/BIOS on an 6711 dsp.

i think i  did it everything to get it work, but still something seems to be missing.

  • i added the linker command file configuration:

MEMORY     { ...

    VECS:     org=           Oh,  len =      0x220

   ...}

SECTIONS { ...

  vectors    :> VECS

...}

  • created the vectors.asm file
    .ref    _myFunc
    .ref    _c_int00
  
	.sect "vectors"
RESET_RST:
    
    mvkl .S2 _c_int00, B0
    mvkh .S2 _c_int00, B0
    B    .S2 B0
	NOP
	NOP
	NOP
	NOP
    NOP
...

INT7:   b _myFunc
	NOP
	NOP
	NOP
	NOP
	NOP
	NOP
	NOP

...
  • in main, i setup the interrupt config:
ISTP = 0x...; //update the ISTP register to the start of "VECS" section
IRQ_resetAll();
IRQ_enable(EXT_INT_7);
IRQ_nmiEnable();
IRQ_globalEnable();


When i try the same configuration with DSP/BIOS version of the project it works fine. But i have to make it without DSP/BIOS. Also when i update the IFR register manually i can make the interrupt work. This means the vector table is configured correct. Seems to be i need to to do some more adjustments to get it work. Can someone help me with the problem please ?

thanks,

Gokhan.

 

  • Hi,

    Still, i couldn't solve the problem. Any idea could be helpful? İ really need to solve it :(

  • If manually setting the IFR works, then your code (as far as the interrupt enable and vector table are concerned).  This tells me that there is probably something between the interrupt source and the IFR that needs configured. 

    Check the 6711 data sheet and make sure that you have the interrupts configured properly.  I quickly scanned the 6711 datasheet, and it seems that there is an external interrupt polarity configuration that needs set up, and I think there is also a MUX register that may need configured to essentially "connect" the pin signal to the flag register.  (This assumes that you are using GPIO pins as interrupts) I suspect that the polarity issue might be secondary,as even if the polarity is backward, it should have triggered when you removed the interrupt condition on the pin. 

    Regards,
    Dan

     

  • i've already tried them, but may be there was something missing. As you see in the vectors.asm, the interrupt comes via external interrupt 7. i tried to use the irq_map function, which configures the mux registers.

    IRQ_map(7,EXT_INT7);

    if i didn't misunderstand, the function links the ext_int7 to the cpu interrupt 7. Also i've already checked the polarity register and its default value is set to "low to high", and making it vice versa didn't work neither. İ will try to check the data sheet again. thanks for your answer.

    By the way, i didn't realize this is the c64x forum. really sorry for that.

    Gokhan.