2014-10-29 09:07 AM
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: &sharppragma vector=SPI_RXNE_vector __interrupt __root void SPI(void) { int a=0; } Do i have to enable the Interrupts globally in any Kind? #spi #stm8l #interrupts2014-12-05 01:29 AM
Yes u need to enable the global interrupts