2024-09-18 05:55 AM - edited 2024-09-18 06:11 AM
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.
2024-09-18 06:24 AM
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.
2024-09-18 06:27 AM
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)?
2024-09-18 06:45 AM - edited 2024-09-18 06:45 AM
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.
2024-09-18 06:47 AM
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.