Skip to main content
Smast.1
Visitor II
August 11, 2021
Question

In Stm32L433, MSB bit is 0 in the first byte while reading from SPI slave

  • August 11, 2021
  • 0 replies
  • 618 views

I have written 0x96 in an external flash at 0th address for 256 lengths and while reading it back the first byte had 0x16 and the rest of the bytes had 0x96 and this issue is observed occasionally.

Settings:

MCU: STM32L433

SPI: SPI 1 in DMA

Bit rate: 24Mhz

Pclk2: 48Mhz

Steps:

  1. Erase 0th sector.
  2. Wait for Idle
  3. Write 0x96 at 0th address for 256 Bytes
  4. Wait for Idle
  5. while reading, 0th location reports 0x16, and rest all read as 0x96

Found a similar issue discussed is the stm32L4 errata sheet where if SPI is configured in high frequency we might see an extra clock at the end of the last transfer.

In my case, I have used PCLK as 48Mhz, SPI bit rate as 24Mhz, and BR[2:0] as 000. Would the issue mentioned in the errata sheet occur in my case? Is that applicable to my setting?

Thanks

This topic has been closed for replies.