- Notifications
You must be signed in to change notification settings - Fork1k
Patch, SPI.transfer16()#2524
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Implement SPI.transfer16() as a true 16 bit transferSigned-off-by: Dr M <drmcnelson@gmail.com>
uzi18 commentedSep 23, 2024
Why did you removed |
Actually, I did not remove it either. It was not in my version of that file. I will make the correction. |
Correction, defined(STM32U0xx)Signed-off-by: Dr M <drmcnelson@gmail.com>
Hi@drmcnelson In fact there is a mistake. Using
It requires to configure the data size to So it should require to manage it.
if (LL_SPI_GetDataWidth(_SPI)!=LL_SPI_DATAWIDTH_16BIT) {/* Change data width to 16 bit */LL_SPI_Disable(_SPI);LL_SPI_SetDataWidth(_SPI,LL_SPI_DATAWIDTH_16BIT);LL_SPI_Enable(_SPI); } This add at least 1 check per transfer.
|
@fpistm Wonderful, thank you, and thank for you looking at it. How about a variable transfer size? Some ADCs are 18 bit (or larger) and some are daisy-chainable, so that transfers could be several times 18 bits (or larger). I have been doing this by hand for an acoustic imaging array, but with the new world of 32 bit processors and higher precision preripherals, maybe it's time to upgrade the SPI interface for everybody. |
Uh oh!
There was an error while loading.Please reload this page.
Implement SPI.transfer16() as a true 16 bit transfer