Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments to SPI Half-Duplex code #19

Open
sgauche opened this issue Feb 13, 2022 · 0 comments
Open

Add comments to SPI Half-Duplex code #19

sgauche opened this issue Feb 13, 2022 · 0 comments

Comments

@sgauche
Copy link

sgauche commented Feb 13, 2022

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.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant