1
Discussion - EVE / Re: Issue with sometimes display works, other times, just the backlight
« on: January 10, 2025, 05:54:22 PM »This is my first time using QSPI which was partly the cause of my confusion. I couldn't figure out if it was something with my custom hardware or my firmware that was causing me so much trouble. I'm using a STM32WB55REV for my two custom boards, one is the sender, and one is the receiver, the receiver is the one connected to a Riverdi display with the BT817Q.
Oh, yes, I still do not have a Nucleo with the STM32WB55.
I am not so invested in STM32 lately since I played with the STM32H7 and could not figure out how to use DMA for the SPI.
And I have seen that other newer devices lik H503 also started using the new DMA unit, not a fan so far.
Quote
I do not see in your code to which address the command is written to.
numberCommand.Instruction = 0xB0; // Get the first byte, should 0xB0 (0x10) to write
And the rest?
If I understand correctly, the QSPI is broken into Command and Address (excuse the variable names, I've been copy/pasting and have to come back to refactor everything, just trying to get something working initially):Code: [Select]numberCommand.Instruction = 0xB0; // Get the first byte, should 0xB0 (0x10) to write
numberCommand.Address = 0x2578;
Yes, as expected, did not see that. :-)
Quote
CS likely is hardware controlled?
Correct, the CS is completely out of my hands which is making it difficult to create the same kind of flow of your library where you setup the _burst commands because I haven't figured out how to keep the CS line pulled low while transmitting the rest of the EVE commands.
I do not know about the QSPI controller but for the other SPIs I am using
eve_spi_handle.Init.NSS = SPI_NSS_SOFT;
I have too many controllers in support for which hardware controlled CS either is not supported or does not work correctly.
Quote
What does this look like on the logic analyzer? The whole sequence for this function and perhaps some bits and pieces before and after.
I've captured waveforms with my Digilent AD 3 and Waveforms software, but they don't really have a QSPI decoder, so I had no idea what I was looking at. As per the suggestion from BRT, I connected an oscilloscope to the QSPI lines and they didn't look well-formed which is what prompted me to change the skew rate, again suggested by BRT. This has seemed to resolve the issue for me.
That is sound advice, for STM32 I am also setting GPIO_SPEED_FREQ_HIGH as maximum.
But then, after I ran into issues some years ago with a Teensy 4.1, I am also using series resistors on my evalboard adapter PCBs, 56R in all lines.
I used to have 10R in series and 22pF to GND as a low impact low-pass filter to smoothen the edges a little bit, but this did not work with the Teensy.
I do not have an oscilloscope available that could accurately measure what is actually going on the SPI, especially without adding load.
My theory is that too agressive switching is leading to refelections on the lines and this is why dampening with a series resistor helps.
Voodoo.