Self-nesting Interrupt / Jump(CI) Problem

hello,

i'm using the ad21489 ez-kit as a SPI receiver/transmitter from/to external converters. 21489 is master (init conversions with PCG).

i've chosen a high sample rate of 192 kHz because very low latency is important. It's NOT possible for me to run a slower samplerate!!

now, due to the fact that the computations in the ISR needs more time than there is between 2 spi-interrupts, downsampling is required. occuring Interrupts during the ISR should be handled after the ISR, which means they should be self-nesting (like in programming reference, page 4.36)

to do so, i want to use the 'jump ISR (CI)' istruction. but this doesn't work. when i run the program it does not jump in the isr. on the second run it immediately stops and i get the error: "Target halted due to software breakpoint but no breakpoint found at address: 0x......". i've searched a lot but can't figure out what is happening.

i've attached the code. hope u can help me with this.

thx a lot in advance,

Tschem

DAasm.zip
Parents
  • hello mitesh,

    your code helped a lot! here's what i did:

    because the programm still didn't respond to pure 'jump (CI)'-instruction, i wrote a 'bit clr imask SPIHI;' instruction before the jump. so, i'm masking the interrupt, allowing the handler to latch it but not respond to it. at the end of the ISR i unmasked it again. don't know if that's normaly necessary, but otherwise it didn't work. now the jump takes place, which didn't happen before, but i loose one interrupt! and thats a big problem. i don't know why, but your code works perfectly, so the jump takes place without masking the interrupt.

    i also implemented the timer0 routine to measure the SPI-ISR calls. with jump(CI) i get more interrupts than without, so self-nesting seems to work.

    to summarize:

    self-nesting doesn't work without masking the interrupt. the jump(ci)-instruction to corresponding subroutine does not happen.

    self-nesting works with masking the interrupt before the jump(ci)-insruction and unmask it at the end of the subroutine. but i'm loosing one interrupt (which corresponds to a sample) and this is a big problem.

    in your code the jump(ci)-instruction works without masking the interrupt.

    i cannot figure out what it is, but maybe u have a clue?

    thx i advance!

    Tschem

Reply
  • hello mitesh,

    your code helped a lot! here's what i did:

    because the programm still didn't respond to pure 'jump (CI)'-instruction, i wrote a 'bit clr imask SPIHI;' instruction before the jump. so, i'm masking the interrupt, allowing the handler to latch it but not respond to it. at the end of the ISR i unmasked it again. don't know if that's normaly necessary, but otherwise it didn't work. now the jump takes place, which didn't happen before, but i loose one interrupt! and thats a big problem. i don't know why, but your code works perfectly, so the jump takes place without masking the interrupt.

    i also implemented the timer0 routine to measure the SPI-ISR calls. with jump(CI) i get more interrupts than without, so self-nesting seems to work.

    to summarize:

    self-nesting doesn't work without masking the interrupt. the jump(ci)-instruction to corresponding subroutine does not happen.

    self-nesting works with masking the interrupt before the jump(ci)-insruction and unmask it at the end of the subroutine. but i'm loosing one interrupt (which corresponds to a sample) and this is a big problem.

    in your code the jump(ci)-instruction works without masking the interrupt.

    i cannot figure out what it is, but maybe u have a clue?

    thx i advance!

    Tschem

Children
No Data