Forum: Digitale Signalverarbeitung / DSP / Machine Learning Interrupt nach SPI Übertragung (Sharc 21369)


von Hans-Peter (Gast)


Lesenswert?

Hab eine fertige SPI Empfangsroutine. Empfang von Daten funktioniert 
problemlos. Bräuchte nach dem Empfang ein Interrupt um die 
InterruptServiceRoutine zu starten. Dort soll dann der Eingangsbuffer 
kopiert und verarbeitet werden.

Mein Problem: Ich bekomme das/den Interrupt nicht zum laufen.

Auf den früheren Modellen, z.B. ADSP-21161N war der Code:
"interruptf( SIG_SPIRI, rcv_ISR);"
beim ADSP-21369 angeblich
"interrupt( SIG_P1, rcv_ISR);"
die rcv_ISR natürlich als void "rcv_ISR(int SIG_INT)"


hier der Quelltext:
/* SPI-B config for RECIEVE */
void SPIB_config()
{
  /* INIT SPI-B SLAVE RECIEVE DMA */
  *(volatile int *)SPICTLB = 0;
  *(volatile int *)SPIFLGB = 0;
  *(volatile int *)SPIDMACB = 0;

  *(volatile int *)SPIFLGB = DS0EN;

  *(volatile int *)IISPIB = (int) rcv_buf;
  *(volatile int *)CSPIB = sizeof(rcv_buf);
  *(volatile int *)IMSPIB = 1;

  *(volatile int *)SPICTLB =   SPIEN|MSBF|CPHASE|WL8|SGN|TIMOD2;

  *(volatile int *)SPIDMACB =   SPIDEN|INTEN|SPIRCV;

  interrupt(SIG_P1,rcv_ISR); /* interrupt when rcv_buffer is full */

  // COMMENT:
      // I'm not shure how to get an interrupt
      // when the recieve buffer (RXSPIB) is full.
      // Here I recieve values but I never get
      // any interrupt?
}


/* RECIEVE ISR */
void rcv_ISR(int sig_int)
{
  printf("\nInterrupt!");

}


Danke im vorraus ...


HP

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.