2022-11-23 08:21 AM
Hello ST team,
We're having an odd SPI bug with our custom board.
We made a board based on the STM32WB55, everything seems to work fine except for this issue.
We're trying to use the spi in mode 0 (CPOL=0 CPHA=0) , but we can't make it work.
We have these settings:
and our code looks like this
while (1) {
uint8_t payload_instruction[1] = {0x9F};
mcg_SX1509B_set_output(INT_SPI_CS_FLASH, 0);
HAL_SPI_Transmit(&hspi2, payload_instruction, sizeof(payload_instruction), HAL_MAX_DELAY);
mcg_SX1509B_set_output(INT_SPI_CS_FLASH, 1);
HAL_Delay(700);
}
And no matter if we set CPHA = 1 edge or CPHA = 2 edge the SPI signal is the same
We tried the same test on a Nucleo Wb55Rg and we had the expected result but not on our custom board.
Is there anything software or hardware we miss to acheive spi mode 0 ?
Thanks you,
Yohann