scb spi on cm0

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

cross mob
lock attach
Attachments are accessible only for community members.
yangyong
Level 5
Level 5
Distributor - Jingchuan(GC)
5 comments on blog First comment on blog 50 questions asked

I have built an application which test SPI  DMA,  i short the  pins MOSI and MISO,   and  uses two DMA channels (  DataWire 0, Channels 20 and 21).    RX trigger  channels20,TX trigger channels 21.  

  it compiles and runs correctly on the CM4 processor. I'm now trying to move that functionality to the CM0+ processor,

 I do   COMPONENTS=BSP_DESIGN_MODUS inside my Makefile,and  setup  interrupts  for the CM0P core.

 it won't work.

when spi sending is finished,program enters DMA transmission interrupt,

the function  Cy_DMA_Channel_GetInterruptStatusMasked always return 0.

Please see the attached project.

I am attaching project .Thank you so much.

 

Thank you so much. 

0 Likes
6 Replies
YuZh
Moderator
Moderator
Moderator
100 replies posted 10 likes received 50 sign-ins

Hi:

You mean you always stuck when you call Cy_DMA_Channel_GetInterruptStatusMasked in tx_dma_complete?

0 Likes
yangyong
Level 5
Level 5
Distributor - Jingchuan(GC)
5 comments on blog First comment on blog 50 questions asked

yes, the program always stuck when i call Cy_DMA_Channel_GetInterruptStatusMasked in tx_dma_complete.

0 Likes
YuZh
Moderator
Moderator
Moderator
100 replies posted 10 likes received 50 sign-ins

Hi:

please wait for a moment, let me reproduce this phenomenon. I have already review your code and find nothing obvious error. Furthermore,  the code can run it based m4 core. So that is very strange. 

0 Likes
YuZh
Moderator
Moderator
Moderator
100 replies posted 10 likes received 50 sign-ins

Hi:

Sorry to response too lately.

I have already build a project that can run SPI+DMA based on M0. So you can add or modify your own code according to that project.

By the way, my test environment is CY8CKIT-062-BLE. 

0 Likes
YuZh
Moderator
Moderator
Moderator
100 replies posted 10 likes received 50 sign-ins

Hi:

My project is too large, please give me your email. I will send you later.

0 Likes
yangyong
Level 5
Level 5
Distributor - Jingchuan(GC)
5 comments on blog First comment on blog 50 questions asked

Thank you. My email is yang.yong@igbt.cn.

0 Likes