2024-04-09 09:26 AM
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:
The logic analyser output looks about as follows, with the white being MOSI, yellow CS and green CLK:
The QSPI code is the following:
The QSPI_Init() function in quadspi.c file looks as follows:
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!!
2024-04-09 09:54 AM
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.