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?



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.


  • \$\begingroup\$ Could you please show the schematic and perhaps also add a scope picture of MOSI using this 10k resistor? \$\endgroup\$ – Huisman Jan 3 at 19:18
  • \$\begingroup\$ Try a 1k resistor. \$\endgroup\$ – rdtsc Jan 3 at 19:19
  • \$\begingroup\$ I tried 1.3k resistor but this time output level stays high all time. \$\endgroup\$ – Akif Çelebi Jan 3 at 19:42
  • \$\begingroup\$ With 10k pull up, the voltage level of MOSI is less than half of voltage level of SCK. I am at home so I cannot add the scope picture:D \$\endgroup\$ – Akif Çelebi Jan 3 at 19:44
  • \$\begingroup\$ Do you have the GPIO pins configured as weak pull-up and pull-down? \$\endgroup\$ – John Birckhead Jan 5 at 20:32

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.

| improve this answer | |
  • \$\begingroup\$ seriously? good to know. I better fix this on the schematic I have right now. Where is this mentioned in the manual? \$\endgroup\$ – DKNguyen Jan 7 at 15:25
  • \$\begingroup\$ It is mentioned in the datasheet of STM32L073. \$\endgroup\$ – Akif Çelebi Jan 7 at 18:12
  • \$\begingroup\$ Man. Buried as a footnote in the Electrical Characteristics section of the datasheet, not the reference manual. \$\endgroup\$ – DKNguyen Jan 7 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.