I am having issues using extrenal interrupts together with the spi on my stm32l152re-nucleo board.
I am using the STM32CubeL1 LL Drivers in the 1.8.0 Version.
I am working with an external device that should give me some interrupt on the PC7 pin. Furthermore I communicate with that device using spi. The SPI MOSI line is connected on the PA7 pin.
Now I have the following problem: Everytime I put data on the MOSI line my interrupt function will be invoced and I have no way to distinguish if it is a real interrupt or just data on my mosi line.
My interrupt initialization:
//enable active high interrupt on PC7
LL_GPIO_SetPinMode(GPIOC, LL_GPIO_PIN_7, LL_GPIO_MODE_INPUT);
LL_GPIO_SetPinPull(GPIOC, LL_GPIO_PIN_7, LL_GPIO_PULL_NO);
I suspect that there is a bug in the LL_SYSCFG_SetEXTISource function. Maybe it also sets the Bit for the PA7(MOSI) line to be passed to the EXTI line? Otherwise I think I should not get interfered with the mosi signal on the interrupt line.
Can someone confirm this as a bug or does somebody know a way to distinguish between a rising edge on mosi(PA7) and the correct interrupt line(PC7)?