cancel
Showing results for 
Search instead for 
Did you mean: 

When STM32G070RB SPI is received, both MOSI and MISO have returned data. The data is the same through the logic analyzer.

DXinp.1
Associate

This is my test program:

uint8_t dev_test=0x00;

while(1)

{

HAL_GPIO_WritePin(DW_NSS_GPIO_Port, DW_NSS_Pin, GPIO_PIN_RESET);

HAL_SPI_Transmit(&hspi1,&dev_test,1,10);

HAL_SPI_Receive(&hspi1,test_R,4,10);

HAL_GPIO_WritePin(DW_NSS_GPIO_Port, DW_NSS_Pin, GPIO_PIN_SET);

delay_ms(100);

}

The driver chips are DW1000 and DW3000. At present, the test program sends 0x00, and DW3000 will return {DE,CA, 03,02}, but the MOSI of SPI should not change.

0693W00000WJnlHQAT.png

1 REPLY 1
S.Ma
Principal

Use transmitreceive function twice, even if one way is made of dummy data. If using DMA define a tx and rx buffer and channels.