2024-09-05 10:23 PM
Hello,
I'm using a Nucleo-WB55RE board with Quad SPI in single mode. I'm trying to start very simply by just reading the chip id from a Riverdi BT81X display. I have captured two waveforms, one via a Nucleo-446 board using regular SPI and one from the WB55.
My QUAD SPI settings are as follows:
Per the datasheet, REG_ID is at address, 302000h:
This is my function to try and retrieve the chip id, everything is hard coded at the moment, just trying to understand the process of using the Command and Transmit/Receive functionality. The datasheet
uint8_t TFT_qspi_read_id()
{
uint8_t pData[4] = {0x00};
QSPI_CommandTypeDef sCommand = { 0 };
/* Enable Reset --------------------------- */
sCommand.InstructionMode = QSPI_INSTRUCTION_1_LINE;
sCommand.Instruction = 0x30;
sCommand.AddressMode = QSPI_ADDRESS_NONE;
sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
sCommand.DataMode = QSPI_DATA_1_LINE;
sCommand.DummyCycles = 0;
sCommand.NbData = 4;
sCommand.DdrMode = QSPI_DDR_MODE_DISABLE;
sCommand.SIOOMode = QSPI_SIOO_INST_ONLY_FIRST_CMD;
if (HAL_QSPI_Command(&hqspi, &sCommand, HAL_MAX_DELAY) != HAL_OK)
Error_Handler();
uint8_t data[4] = {0x20, 0x00, 0x00, 0x00};
if (HAL_QSPI_Transmit(&hqspi, data, HAL_MAX_DELAY) != HAL_OK)
Error_Handler();
if (HAL_QSPI_Receive(&hqspi, pData, HAL_MAX_DELAY) != HAL_OK)
Error_Handler();
return *pData;
}
Looking at the captures, I can see that 0x7C is in fact coming back from the Transmit call but sending the receive doesn't return the value.
Any ideas of what I can try to figure this out?
Kindest regards.