2021-11-19 06:53 AM
Hi,
I am currently working on the STM32H743 and i'm trying to bring data from SPI6 to a buffer in D2. As I have a lot of data to read i would like to use the DMA in order to transfer data without using the cpu. I don't understand whether I can use the DMA1/2 in order to do this or not.
For instance, with the SPI1, in D2, I can choose the DMA request as the DMA_REQUEST_SPI1_RX/TX. However the only request I can use with SPI6 is BDMA_REQUEST_SPI6_RX/TX. does it mean that I can only use the bdma here ?
However as BDMA is restricted to the D3 domain, it can't write data on a buffer in D2. How can I write it then ?
Do someone have a clear answer to this ? if so could you explain the required step i would need to implement the solution.
2022-06-22 12:40 AM
Hi MHana.1,
I took a look at the code, i don't understand the presence of PG9 as external interrupt. Also, the togglepin PE5 which means?
Do u have also test SPI6 as Slave?
Thanks!!
2022-06-22 02:00 AM
Hi GCava.2,
PG9 and toggling PE5 to test something related to my application. What do you mean by "Do u have also test SPI6 as Slave?", do you mean using my board as an SPI slave?. I did not use it as a slave I only used it as master with BDMA to communicate with SLAVE chip. But I think you can modify the example attached above to do so.
Thanks
2022-06-23 06:45 AM
Hi @MHana.1 ,
thanks for ur answer. Yes, my idea is to use SPI6 as a slave.
However, I'm trying to debug ur sharing code, I noticed a very strange thing. Suppose to not connect anything to SPI6, and it is configurated likes ur code. If I debug HAL_SPI_Transmit(&hspi6,(uint8_t *)"HELLO",10, 500); I have HAL_ERROR with ErrorCode 32d (So timeout problems) but also if I analyze registers, with Live Expressions, I can see that this code line *((__IO uint8_t *)&hspi->Instance->TXDR) = *((uint8_t *)hspi->pTxBuffPtr); doesn't modify the TXDR register, that is every 0.
Have u some suggestion about this situation?
Thanks and regards!!!
2022-06-23 06:48 AM
I also tried using a different SPI, without DMA. and I have the same problem.....
Thanks!!
2022-06-27 03:54 AM