AnsweredAssumed Answered

STM32F4xx SPI2 and USB-HS conflict

Question asked by Deni on Jun 12, 2015
Latest reply on Jun 12, 2015 by mhiri.nesrine
I have been hit with an odd issue - we have a very complex board, using practically all of STM32F429 device's peripherals (Ethernet, USB HS device, SDCARD, I2C , SDRAM interface, 3 SPI channels...).

When USB HS (with external PHY - so DP and DM lines are not used) is attached to the PC, SPI2 MOSI line drops dead. It happens when the driver enables USB HS device on the chip. It looks like MOSI line gets disconnected from the SPI controller (it's driver operates in the background, clock output is toggling etc.). As soon as USB is disconnected and disabled, MOSI jumps to live again. I managed to create bare-bone example with only USB and SPI2 activated and checked various pin configurations for SPI2  - it only affectes MOSI when it's routed to PB15 (when routed to PC3 and PI3 it works).

I checked GPIOB configuration registers during USB operation and all seems to be OK
and not changed from original settings, so I have no idea how can PB15 be disabled.

According to datasheet, PB14 and PB15 are used for USBHS DP and DM lines, when internal PHY is selected, so I guess there must be some hardware bug that erroneously attahces PB15 to it (PB14 outputs SPI clock all the time) even when external PHY is enabled...

I also tested this on Keil's MCBSTM32F400 board with STM32F407 device - same thing. If anybody wants to try it out, I can post complete Keil project of that bare-bone example...

Any ideas?