cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Loopback Test with QuadSPI

bad-engineer
Associate

I am trying to test QuadSPI peripheral in the STM32H745BIT6 by carrying out an internal Loopback test. I am apparently not configuring its parameters correctly. Can anyone suggest what configurations I should do for QuadSPI and if there's anything wrong with these functions (the code halts at the breakpoint on the last error handler function inside the QSPI_LoopbackTransmit() function)? main.c code is attached.

 

 

4 REPLIES 4
TDK
Guru

You can't do a loopback with QSPI. It's not an SPI interface. The data pins are not driven the same way. In particular, for a given stage of the transmission, the peripheral is either sending data, or receiving data, but not both.

If you feel a post has answered your question, please click "Accept as Solution".

Thank you for replying, can you suggest an experiment that I can do to test QSPI functionality without an external device to connect to (like flash memory, ADC, etc)?

Transmit data and monitor it on a scope or logic analyzer. Verify the correct number of pulses and that the data is as expected. You can do the same with receive.

If you feel a post has answered your question, please click "Accept as Solution".

That's going to be very difficult. You can test an actual device by reading the ID, or serial numbers, and perhaps writing into a transient buffer, and then recovering.

You could do some pretend read-back by selecting pull-up / pull-down for the data pins, and then doing a READ as if it where to a NOR FLASH device (W25Q256, MT25QL128, pick whatever), with a command, address, data phases,and confirm the stuck-at pattern(s) that you can make come back.

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