- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please ensure the interrupt source for CM4 is enabled in the "Interrupt" tab of the "cydwr" file.
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did all that. The SPI is triggering the DMAs. Everything is configured and enabled on the CM4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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