AnsweredAssumed Answered

STM8L Interrupt

Question asked by schneider.daniel.001 on Oct 29, 2014
Latest reply on Dec 5, 2014 by Niks
Hello,
I'm using the STM8L151 using IAR workbench without ST Firmware Library and I'm trying to use an SPI Interrupt. Unfortunatey it doesn't work.

SPI is already running, the receiving flag is set, but i don't get an Interrupt:

This is the configuration:


  SYSCFG_RMPCR1=0x00;                          //MIS0->PB7, MOSI->PB6, SCK->PB5, NSS->PB4
  CLK_PCKENR1=0x10;                             //enable SPI clock
  SPI1_CR1=0x30;                                 //enable SPI, Baurate
  SPI1_CR1_CPOL=0;
  SPI1_CR1_CPHA=1;
  SPI1_CR1_LSBFIRST=0;
  SPI1_CR2_SSM=1;
  SPI1_CR2_SSI=1;
  SPI1_CR1_MSTR=1;
  SPI1_CR1_SPE=1;
  SPI1_ICR_RXIE=1;                    Enable SPI Interrupt

And the Interrupt vector:
#pragma vector=SPI_RXNE_vector
__interrupt __root void SPI(void)
{
int a=0;
}

Do i have to enable the Interrupts globally in any Kind?

Outcomes