Skip to main content
Webster
Associate
January 31, 2021
Solved

STM32L476VGT6 problem with sending commands in QPI mode

  • January 31, 2021
  • 2 replies
  • 1620 views

Hi,

I’m using STM32L476VGT6 device with external flash memory in QPI mode. Everything works fine until I try to send a command byte with no address and no data. For example, when I try to send the command 0xF5 (exit QPI mode), on the logic analyzer I can see that line IO1 is not controlled by the MCU and stays low. But with the same configuration, when I add address byte everything works well again. It looks like with just command byte sent, line IO1 stays in MISO mode instead of QPI mode.

Pinout of the logic analyzer:

CS – 6

CLK – 4

IO0 – 7

IO1 – 5

IO2 – 3

IO3 – 2

Sending command 0xF5 with no address and no data.

CCR register value is 0x3F5:

Instruction – 0xF5

IMOD – Instruction on four lines0693W000007DK9HQAW.pngSending command 0xF5 with one address byte and no data.

CCR register value is 0xFF5:

Instruction – 0xF5

IMOD – Instruction on four lines

AMODE – Address on four lines0693W000007DK9lQAG.pngOn the first capture the IO1 line (pin 5) stays low during the command phase, but on the second capture the IO1 line goes high as it should. What could be the cause of this problem? I would appreciate all help.

This topic has been closed for replies.
Best answer by Andreas Bolsch

See errata sheet ES0250 Rev 8, 2.6.1. Experiment with other settings, i.e. indirect read instead of write (or vice versa), or send command as address or data or alternate byte with no instruction, maybe one combination works ...

2 replies

Andreas Bolsch
Andreas BolschBest answer
Lead III
January 31, 2021

See errata sheet ES0250 Rev 8, 2.6.1. Experiment with other settings, i.e. indirect read instead of write (or vice versa), or send command as address or data or alternate byte with no instruction, maybe one combination works ...

Webster
WebsterAuthor
Associate
January 31, 2021

Sending command as 1-byte address with no instruction and no data works fine.

Thanks for your support.