Skip to main content
TLavi.1
Visitor II
April 26, 2023
Solved

OctoSPI command to read single byte

  • April 26, 2023
  • 2 replies
  • 1156 views

Is there an OctoSPI sCommand configuration which will generate only 8 clock cycles and read the result from MISO via HAL_OSPI_Receive?

I'm attempting to use Macronix code (MX25l2565G flash) tied to a single SPI bus channel via OctoSPI. That code uses GetByte() which performs a single byte read.

I've tried several configurations, including setting InstructionMode and AddressMode to "None", adding/removing DummyCycles, but either I set an Instruction/Address mode and have an extra 8 clock cycles or HAL_OSPI_Receive fails.

Thanks!

Thanks!

This topic has been closed for replies.
Best answer by Tesla DeLorean

The low level code the OP is trying to port is operating at a level below that of the peripheral. Unfortunately the actual code that was being ported was not cited, and the command in question was not stated.

The OCTOSPI peripherals performs many of the low level functionality at a bit/byte level, so the OP needs to pop up a level or two and get a higher level perspective on the command transaction they are attempting to replicate.

2 replies

Tesla DeLorean
Guru
April 26, 2023

Need to rethink the approach, the NCS low would anticipate sending a command first.​ Look at what you're trying to implement and zoom out a level to understand the command/response sequence you're actually trying to implement / port..

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ST Technical Moderator
May 8, 2023

Hello @TLavi.1​,

Looking to the datasheet of the memory, it doesn't support this command.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
May 8, 2023

The low level code the OP is trying to port is operating at a level below that of the peripheral. Unfortunately the actual code that was being ported was not cited, and the command in question was not stated.

The OCTOSPI peripherals performs many of the low level functionality at a bit/byte level, so the OP needs to pop up a level or two and get a higher level perspective on the command transaction they are attempting to replicate.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..