2025-12-09 11:51 PM - last edited on 2025-12-10 5:57 AM by mƎALLEm
Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code and a linker script content. Please read this post: How to insert source code.
Hi everyone,
I'm trying to interface an ICNA3306 LCD display using STM32's QSPI peripheral. The LCD uses a custom protocol where commands are sent as:
Expected behavior: 32 clock pulses (8 instruction + 24 address) Actual behavior: Only 8 clock pulses (instruction only - address phase not transmitted)
Here's my code:
HAL_StatusTypeDef ICNA3306_WriteCommand(uint8_t cmd)
{
QSPI_CommandTypeDef sCommand = {0};
sCommand.InstructionMode = QSPI_INSTRUCTION_1_LINE;
sCommand.Instruction = 0x02;
sCommand.AddressMode = QSPI_ADDRESS_1_LINE;
sCommand.AddressSize = QSPI_ADDRESS_24_BITS;
sCommand.Address = (0x00 << 16) | (cmd << | 0x00;
sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
sCommand.DataMode = QSPI_DATA_NONE;
sCommand.DummyCycles = 0;
sCommand.DdrMode = QSPI_DDR_MODE_DISABLE;
sCommand.SIOOMode = QSPI_SIOO_INST_EVERY_CMD;
return HAL_QSPI_Command(&hqspi, &sCommand, HAL_MAX_DELAY);
}
QSPI Configuration:
hqspi.Init.ClockPrescaler = 13;
hqspi.Init.FifoThreshold = 4;
hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE;
hqspi.Init.FlashSize = 23;
hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_6_CYCLE;
hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0;
Oscilloscope shows:
and then right waveform is below:(make QSPI using GPIO)
2025-12-10 12:20 AM
Hello,
I don't see any relation between the title and the request. Could you please clarify?
2025-12-10 5:48 AM
oh I am sorry.
I fixed it.
2025-12-10 5:57 AM - edited 2025-12-10 7:01 AM
You need also to provide the MCU product part number you are using.
How to write your question to maximize your chances to find a solution