cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6

AnCi_2234676
New Contributor II

Hi,

I am trying to use a piece of code from a co-worker that is communicating with a micro SD by SPI using DMAs. The code was originally running on the CM0+, but for my application, I wanted to have it run on the CM4. I have copied the corresponding blocks from the TopDesign (I am using PSoC Creator) and enabled the interrupts in the CM4 instead of the CM0+. Everything builds fine, but when I try to run the application, I get a fault which seems to happen when the interrupt of the DMA triggers (I never reach the ISR).

I tried to run my application on the CM0+ and everything works fine.

Any idea what might be causing this?

Unfortunately, I cannot share my code, but I hope someone will be able to help me find a way to make it work.

Thanks

0 Likes
1 Solution
Hari
Moderator
Moderator

Hi AnCi_2234676

Can you please check with one of the CEs? You could build on that. If not, would it be possible to post a minimal version of the project that you are using? With just the basic components so that we can debug the issue at our end?

Thanks,
Hari

View solution in original post

0 Likes
4 Replies
NoriakiT_91
Employee

Please ensure the interrupt source for CM4 is enabled in the "Interrupt" tab of the "cydwr" file.

Regards,

Noriaki

Hari
Moderator
Moderator

Hi AnCi_2234676

As mentioned in post above, please make sure that the interrupt source is checked for CM4.
Additionally, there are a few other basic checks that can be done.

1. Make sure that the CM4 is enabled by calling  Cy_SysEnableCM4(CY_CORTEX_M4_APPL_ADDR);  in main_cm0p.c.

2. Make sure that Global interrupts are enabled by calling __enable_irq() in main.cm4.

3. All the DMA related CEs are configured for CM4. You can refer any CE such as the PWM triggering DMA which configures the DMA for CM4.

Thanks,
Hari

0 Likes
AnCi_2234676
New Contributor II

I did all that. The SPI is triggering the DMAs. Everything is configured and enabled on the CM4.

0 Likes
Hari
Moderator
Moderator

Hi AnCi_2234676

Can you please check with one of the CEs? You could build on that. If not, would it be possible to post a minimal version of the project that you are using? With just the basic components so that we can debug the issue at our end?

Thanks,
Hari

View solution in original post

0 Likes
Top labels