2021-12-03 01:17 AM
Hi everyone,
I have to port one proyect from a STM32F4 to a STM32H743. In this project it is important to use the SPI through DMA, so after reading a bit about the DMA-Cache issue in this microcontroller i decided to disable the D-Cache in order to make this change fast, but the DMA is not working.
When i use the function HAL_SPI_TransmitReceive_DMA(spiHandler, tx_block, block, size); Ir returns HAL_OK and the handler goes to Busy state, but nothing happens.
After searching, i found this topic :
https://community.st.com/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices
So i tried to change my linker script according to that, placing the ".data" ".bss" and " ._user_heap_stack" to ">RAM_D1 AT> FLASH" (before it was ">RAM_D1"), removing the initial "_estack" definition and adding "_estack = .;" inside " ._user_heap_stack". But when i do this is like if the program was always attending interruptions and cannot run the application:
Any help would be really appreciated!
2021-12-03 06:43 AM
If TIM1 is constantly firing and preventing your code from progressing, I would look into that. Show the code you're using. Perhaps your interrupt rate is too high.
Adding "> FLASH" isn't changing where the data is ultimately stored if it was already in RAM_D1 to begin with. Include your linker script.
2021-12-08 10:23 PM
I cant upload the whole code but segments of it. I attach the linker script. What bothers me is that if i remove the changes added to the linker script the code runs fine, in spite of not working the DMA. Besides, with the previous microcontroller it worked well. But now it seems to only execute the interrupt handlers:
2021-12-09 01:08 AM
I have seen that it i uncomment one section of my code, it runs. I dont see anything extrange in that code:
However, in spite of this, the DMA is not working. I call the function "status = HAL_SPI_TransmitReceive_DMA(spiHandler, tx_block, block, size);" but the DMA_Stream_IRQHandler is never called.