AnsweredAssumed Answered

spi clock error in STM32L431

Question asked by cai.bai on Mar 10, 2017
Latest reply on Mar 10, 2017 by KIC8462852 EPIC204278916

hi,I want use SPI1 as master and SPI1 reg configure as that

    SPI1->CR2 = 0x1704;     SPI1->CR1 = 0x15C;

read code is

 

    GPIOA->BSRR |= 1 << 20; //set NSS low    for(i = 0;i < command_size;i++) {        while (0 == (SPI1->SR & SPI_SR_TXE));         SPI1->DR = out_buf[i] & 0xFF;         while (0 == (SPI1->SR & SPI_SR_RXNE));         in_buf[i] = SPI1->DR & 0xFF;     }    GPIOA->BSRR |= 1 << 4; //set NSS high

i use logic analyzer capture the logic as

 

it saw that clock also driver after NSS set high.

can anyone help me

Outcomes