Electronic – The MOSI pin of SPI1 on STM32L073 is not giving output without pull-up resistor

pullupspistm32

I am working on SPI communication with STM32L073.

I download the example program of ST to MCU but SPI1 did not work. So I looked at the SCK pin of MCU with oscilloscope and it works fine. But when I look at the MOSI pin, I did not see anything. After that I pulled-up the MOSI pin with 10k resistor and I saw that it worked but not high enough which is not 3V3.

So what should I do to get enough output value from MOSI pin?

Pinout:
SP1,
MOSI: GPIOA, GPIO_PIN_12.
MISO: GPIOA, GPIO_PIN_11.
SCK: GPIOA, GPIO_PIN_5.
NSS: GPIOA, GPIO_PIN_4.

Thanks…

Edit1: I tested SPI with Nucleo-073rz. SPI worked just fine. But when I test it with my pcb, MOSI pin doesn't give output at all but SCK, NSS are fine.

Edit2: We replaced chip to stm32L152, it works!!! But I need to use STM32L073.

Schematic

Best Answer

We found the problem which is we did not connect VDD_USB to VDD. Because PA11 and PA12 pins can be used as I/O only if VDD_USB pin is supplied between VDD_min and VDD_max.