stm32-rs / stm32h7xx-hal

Peripheral access API for STM32H7 series microcontrollers
BSD Zero Clause License
209 stars 99 forks source link

SPI-W25Q128 use standard SPI #475

Open userdai1 opened 6 months ago

userdai1 commented 6 months ago

On the hardware, I use external high-speed crystal oscillator 50MHz, the program set pll1_q_ck 10MHz, SPI 1MHz, do not use hardware CS, CS use ordinary GPIO push-pull output. After initializing SPI, pull down the CS pin and use the write function to send data, the logic analyzer cannot catch the MOSI terminal and CLK waveform, and MOSI is always at a high level, and the program will get stuck when executed to the write function, but the code written by me in other languages can realize the read and write function, I think the problem lies in the SPI setting. Could you please help me see what the problem is 图片 图片 图片 图片

HaoboGu commented 6 months ago

check the example here, do you call spi.send?