1
Discussion - EVE / Re: Issue with sometimes display works, other times, just the backlight
« on: January 10, 2025, 02:04:34 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.
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):
Those two lines are equivalent to these lines in your library:
Then it sets up the EVE command and the value:
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'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.
Kindest regards.
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;
Those two lines are equivalent to these lines in your library:
Code: [Select]
spi_transmit((uint8_t) 0xB0U); /* high-byte of REG_CMDB_WRITE + MEM_WRITE */
spi_transmit((uint8_t) 0x25U); /* middle-byte of REG_CMDB_WRITE */
spi_transmit((uint8_t) 0x78U); /* low-byte of REG_CMDB_WRITE */
Then it sets up the EVE command and the value:
Code: [Select]
uint8_t cmdArray[8] = {
(uint8_t)(CMD_SETROTATE & 0x000000ff),
(uint8_t)(CMD_SETROTATE >> 8),
(uint8_t)(CMD_SETROTATE >> 16),
(uint8_t)(CMD_SETROTATE >> 24),
/* Rotation */
(uint8_t)(rotation & 0x000000ff),
(uint8_t)(rotation >> 8),
(uint8_t)(rotation >> 16),
(uint8_t)(rotation >> 24)
};
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.
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.
Kindest regards.