2022-06-28 02:13 AM
I am trying to make SPI6 work with BDMA I see that transfer completion flag set in BMA ISR but SPI registers i don't see EOT bit set. I don't see any data coming from MOSI line of SPI6. Please help me know what is going wrong. There is no error set in any of the registers I have attached a screen shot of BDMA and SPI6 registers. I am using BDMA channel 0 for Rx and BDMA channel 1 for Tx.
Solved! Go to Solution.
2022-07-08 06:50 AM
Hi,
Thanks for the help.
I could figure out the problem.
I am able to transfer and receive the data's using SPI6 with BDMA.
2022-06-28 02:45 AM
Which STM32?
> I don't see any data coming from MOSI line of SPI6.
And SCK?
Have you tried polled implementation of SPI6, or at least transmit by writing directly into registers in debugger?
JW
2022-06-28 02:58 AM
Iam Using STM32H743I
2022-06-28 03:45 AM
No SCK as well
2022-06-28 04:31 AM
Try polled implementation of SPI6, to make sure there's no problem in SPI itself, GPIO or clocks.
JW
2022-06-28 11:27 PM
I tried in polling method after i use HAL_SPI_Transmit its waiting in
while ((__HAL_SPI_GET_FLAG(hspi, Flag) ? SET : RESET) == Status)
for EOT flag in SR register to be set. What can be the reason for this?
I see the SPI6 registers are getting filled properly.
2022-07-08 01:30 AM
Hello @SHebb.1 ,
have u define the buffer correctly?
For example, I resolved my problems in this way:
static uint8_t __attribute__ ((section (".BDMA_Access"),used)) sbuffer_tx[2];
static uint8_t __attribute__ ((section (".BDMA_Access"),used)) sbuffer_rx[2];
Then, inside the main, u can initialize the buffer, as:
sbuffer_tx[0]= 0x00;
sbuffer_tx[1]= 0x00;
and the u can use the sample HAL:
HAL_SPI_TransmitReceive_DMA(&hspi6, sbuffer_tx, sbuffer_rx,sizeof(sbuffer_rx));
Finally ".BDMA_Access" is defined inside the linker script file as:
.BDMABlock :
{
. = ALIGN(32);
*(.BDMA_Access)
} >RAM_D3 AT> FLASH
Bye!!!
2022-07-08 06:50 AM
Hi,
Thanks for the help.
I could figure out the problem.
I am able to transfer and receive the data's using SPI6 with BDMA.