How to convert data coming from SPI
Hi, I connect X-NUCLEO-CCA02M1 to my NUCLEO-F401RE. I am using SPI1 for the communication between devices. For what I have understood the function below convert N bit (for me N = 8) in a integer. Since i want to stream via UART those bit how can i process the data?
HAL_SPI_Receive_DMA(&hspi1, (uint8_t*)rx_buffer, BUFFER_SIZE);To enable the data processing I am using this callback
void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi){
dataReadyflag = 1;
}And then I am checking in the while loop is possible to start data processing as shown
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
if(dataReadyflag == 1){
process_data();
send_data();
dataReadyflag = 0;
}
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}I am thinking that maybe is possible to read the data from SPI before conversion in some register. Is this possible?
