Open sgauche opened 2 years ago
Hi,
Could you add comments to the code that explain the reason for the 67 __asm("dsb\n"); in the SPI_Read function. The comment that is there suggests it has to do with SPI clock timing, but a comment explaining how 67 was derived would be very helpful.
__asm("dsb\n");
SPI_Read
https://github.com/STMicroelectronics-CentralLabs/ST_Drone_FCU_F401/blob/master/STM32%20FW%20Project/Official%20release%20-%20170120/Drivers/BSP/STEVAL_FCU001_V1/steval_fcu001_v1.c#L523-L533
SPI_Read_nBytes also has 2 __DSB(); calls and it would be helpful to add a comment on why 2 DSB's were used.
SPI_Read_nBytes
__DSB();
https://github.com/STMicroelectronics-CentralLabs/ST_Drone_FCU_F401/blob/master/STM32%20FW%20Project/Official%20release%20-%20170120/Drivers/BSP/STEVAL_FCU001_V1/steval_fcu001_v1.c#L611-L612
Thanks!
Hi,
Could you add comments to the code that explain the reason for the 67
__asm("dsb\n");
in theSPI_Read
function. The comment that is there suggests it has to do with SPI clock timing, but a comment explaining how 67 was derived would be very helpful.https://github.com/STMicroelectronics-CentralLabs/ST_Drone_FCU_F401/blob/master/STM32%20FW%20Project/Official%20release%20-%20170120/Drivers/BSP/STEVAL_FCU001_V1/steval_fcu001_v1.c#L523-L533
SPI_Read_nBytes
also has 2__DSB();
calls and it would be helpful to add a comment on why 2 DSB's were used.https://github.com/STMicroelectronics-CentralLabs/ST_Drone_FCU_F401/blob/master/STM32%20FW%20Project/Official%20release%20-%20170120/Drivers/BSP/STEVAL_FCU001_V1/steval_fcu001_v1.c#L611-L612
Thanks!