Is there any example where it uses DMA SPI?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HaSo_2959646
Level 2
Level 2
First like received First like given

Hello everyone,

I'm trying to transfer data over SPI protocol using DMA. I see examples of SPI_SLAVE and SPI_MASTER but they don't use DMA. I was wondering if someone has done this before?

Kind regards,

Hamid.

0 Likes
1 Solution

Unfortunately, the DMA for 43907 is not really exposed so that applications on top can use that. That's why you can't see it in SPI_SLAVE or SPI_MASTER implementation amongst which 43907 only supports master mode. Please check this blog post SPI in CYW43907 if you are facing any difficulties in SPI implementation.

View solution in original post

7 Replies
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Which platform are you using?

0 Likes

CYW943907EVAL1F

0 Likes

Unfortunately, the DMA for 43907 is not really exposed so that applications on top can use that. That's why you can't see it in SPI_SLAVE or SPI_MASTER implementation amongst which 43907 only supports master mode. Please check this blog post SPI in CYW43907 if you are facing any difficulties in SPI implementation.

I tested SPI using that example. When you increase the tx buffer size > 4, in inter-byte time delay increases and byte order gets messed up…this issue was also reported here:

https://community.cypress.com/message/142610#142610

I want to transmit larger packets of data without inter-byte delay, so how do I overcome this issue?

I can try include DMA in the SPI_MODE, but this doesn’t seem to fix the problem:

#define SPI_MODE     ( SPI_CLOCK_RISING_EDGE | SPI_CLOCK_IDLE_LOW | SPI_MSB_FIRST | SPI_USE_DMA )

How do I correctly use the DMA?

0 Likes

Unfortunately, you can't really use SPI over DMA; it's not exposed on the surface in WICED. You have to use the GSIO driver present in WICED. 

Please share the changes that you have made to send larger packets of data.

I tried to increase the tx buffer size to 5 and it appears to receive the data in orrect sequence.

0 Likes
David_Zhang
Level 5
Level 5
Distributor - Arrow(GC)
First like received 50 sign-ins 25 sign-ins

hi   PriyaM:

     please check the code,  can you share the SPI over DMA demo code?? tks;

    Re: SPI rate change in code

0 Likes