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

STM32U5 DMA SPI not working yet #196

Open
multiplemonomials opened this issue Nov 3, 2023 · 3 comments
Open

STM32U5 DMA SPI not working yet #196

multiplemonomials opened this issue Nov 3, 2023 · 3 comments
Labels
Bug Dis is broken STMicro Only affects STMicro targets

Comments

@multiplemonomials
Copy link
Collaborator

DMA SPI is currently not functional on this device family. Need to test things out some more...

@multiplemonomials multiplemonomials added Bug Dis is broken STMicro Only affects STMicro targets labels Nov 3, 2023
@wdx04
Copy link

wdx04 commented Apr 27, 2024

I have used the DMA SPI to drive an ILI9341 240x320 SPI display on a custom STM32U575RI board without a problem.
It takes 35ms to refresh the whole display in RGB565 format, compared to 103ms when DMA is turned off.

@wdx04
Copy link

wdx04 commented May 18, 2024

@multiplemonomials
Hi Jamie,
I found a bug(typo?) in stm_dma_utils.c, line 691 and line 709, when data alignment is 4, DestDataWidth should be set to DMA_DEST_DATAWIDTH_WORD instead of DMA_DEST_DATAWIDTH_BYTE:

switch(memDataAlignment) {

This bug only affects STM32U5 with 32bit data transfer.

@wdx04
Copy link

wdx04 commented May 18, 2024

Also, I noticed the meaning of "Length" parameter of some DMA APIs (e.g. HAL_TIM_PWM_Start_DMA) has been changed in STM32U5. In STM32 series before STM32U5, "Length" means the number of data items to be processed, but in STM32U5, "Length" means the number of data bytes (number of data items * data width in bytes) to be processed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dis is broken STMicro Only affects STMicro targets
Projects
None yet
Development

No branches or pull requests

2 participants