Question
Read Continuous Data from An the SPI interface
int main (){
uint16_t txConvertData[2]={0};
uint16_t rxConvertData[2]={0};
const uint16_t ConvertCommandMask = 0b0000000000000000;
while(1){
for (int j = 0; j < 2; j++) {
// Send read command
HAL_GPIO_WritePin(IN_SPI2_CS_GPIO_Port, IN_SPI2_CS_Pin, GPIO_PIN_RESET);
hal_status = HAL_SPI_TransmitReceive(&hspi2, (uint8_t*) &txConvertData[j], (uint8_t*) &rxConvertData[j], 1, 100);
HAL_GPIO_WritePin(IN_SPI2_CS_GPIO_Port, IN_SPI2_CS_Pin, GPIO_PIN_SET);
HAL_Delay(100);
if (hal_status != HAL_OK) {
printf("HAL SPI TransmitReceive error: %d\r\n", (int) hal_status);
}
}
}Hello,
On a custom designed PCB, there is STM32F407 processor and its SPI interface get a data from an external ADC. My aim is that getting the converted signal from the ADC continuously. When I started to debug session, I got the conversion value just one at time. Do you have a suggestion to solve the problem?
In addition, I tried to plot SW trace plotting in the debug session but I didn't get nothing.
