cancel
Showing results for 
Search instead for 
Did you mean: 

STML496RGT from SPI to QSPI

martindinotanner
Associate

Hi all!

I'm currently programming a pulser and have to write a list of registers. I prepared the communication on SPI (which works), only to realise the pulser can only be programmed over QSPI.

Now I'm having some issues switching my code from SPI to QSPI communication. Below is the initial code in SPI format that is running just fine when analysing the output using a Logic Analyser:

 

Untitled (21).png

The logic analyser output looks about as follows, with the white being MOSI, yellow CS and green CLK:

Untitled (19).png

 

The QSPI code is the following:

Untitled (20).png

The QSPI_Init() function in quadspi.c file looks as follows:

Untitled (22).png

 

However, the only output I get here is the CLK line toggling with a frequency of 2 MHz and nothing on any of the 4 data lines or CS.

Does anyone have an Idea why this (pretty straightforward) code is not running as expected?


Any help is greatly appreciated!!

 

1 REPLY 1

Please use the code pasting tool </> when in-lining code, rather than screen-shots/bitmaps.

The QSPI transmit code looks unhelpful. There needs to be some other context structure conveying the size and mode of transfer.

The QSPI library isn't really designed for this, the QSPI Peripheral might be more flexible, but you'll need to review the Reference Manual to better understand its modes and abilities, and then the applicability to your application.

Would recommend using blocking polled modes to explorer functionality, IT or DMA just adds more dimensions to your problem space.

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