2012-02-01 03:44 AM
Hi,
Is there any known problem/limitation on having interrupts during SPI comunication (between micro and external flash for example)? Thanks. #spi2-sck-open-drain-output2012-02-01 09:01 AM
Well access to a device on the SPI bus is not going to be atomic, so you might want to consider using semaphore/mutex type controls to arbitrate access, or use a state machine to order access to device(s) on the SPI bus.
I'm not aware of any specific issue with the STM32 implementation of SPI and interrupts. Perhaps you can be more specific about what you're doing, what happens in the interrupt routines, and issues you are experiencing.2012-02-02 04:34 AM
2012-07-02 12:07 AM
Hi All,
I am using STM32L SPI2 to communicate with a Analog IC (5V digital system), I expect the MCU output voltage can reach 5V. I configure SPI2 to open drain output and connect both pin to 5 Volt rail via 4.7K resistor, but MOSI can reach 3.8 Volt only, the SCK output 3 volt only. /* SPI2 SCK and MOSI pins configuration */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;//GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_40MHz; GPIO_Init(GPIOB, &GPIO_InitStructure); GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_SPI2); GPIO_PinAFConfig(GPIOB, GPIO_PinSource14, GPIO_AF_SPI2); GPIO_PinAFConfig(GPIOB, GPIO_PinSource15, GPIO_AF_SPI2); How to solve this problem? Regards Samuel