cancel
Showing results for 
Search instead for 
Did you mean: 

OctoSPI command to read single byte

TLavi.1
Associate

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!

1 ACCEPTED SOLUTION

Accepted Solutions

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
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

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
Up vote any posts that you find helpful, it shows what's working..
FBL
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.

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
Up vote any posts that you find helpful, it shows what's working..