ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Четверг
18 июля
609632 Топик полностью
Nikolay801_ (16.07.2015 11:30, просмотров: 135) ответил Dingo на Есть версии, почему STM32F407 может GPIO дёргать так (по времени)? Надо прочитать 3 байта, CS в это время дёргать нельзя, его формирую дрыгногой. Запускаю, жду флага "принят байт", забираю первый, второй, третий, потом снимаю CS. На осциллограмме
а это вообще может работать? спиай не будет ничего принимать если ничего не передать. 
The software has to follow this procedure to transmit and receive data (see Figure 253 and Figure 254): 1. Enable the SPI by setting the SPE bit to 1. 2. Write the first data item to be transmitted into the SPI_DR register (this clears the TXE flag). 3. Wait until TXE=1 and write the second data item to be transmitted. Then wait until RXNE=1 and read the SPI_DR to get the first received data item (this clears the RXNE bit). Repeat this operation for each data item to be transmitted/received until the n–1 received data. 4. Wait until RXNE=1 and read the last received data. 5. Wait until TXE=1 and then wait until BSY=0 before disabling the SPI.
Будь ты проклят, Перри-Утконос!