cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 Changing SPI CPHA on custom board doesn't change clock phase

YAsso.1
Associate

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:

 0693W00000WJM4pQAH.pngand 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

 0693W00000WJM4uQAH.jpg0693W00000WJM5EQAX.jpgWe 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

0 REPLIES 0