- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi - I have a DMA nrq signal connected to ISR_1. I can not get the ISR to execute even though I bought out the nrq pin and I can see a 50 ns pulse there. I can insert the software command to trigger the IRQ and that works fine. I did an experiment where I tied the IRQ to a digital constant "1" with level triggering and that works. It looks like the processor is stuck in CY_ISR(IntDefaultHandler). I'm not sure what I'm doing wrong and would appreciate some help here. File with the ISR calls is ModulatorLoop.c
thanks much - Paul
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Motoo – I reverted to old code and added the new changes one at a time. Works now! I can’t explain it but I’m moving on.
Thanks for your input. I appreciate it. Have a great weekend - Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
How about trying something like ..
==========================
CY_ISR(isr_1_func)
{
isr_1_func_ClearPending() ;
/* do something for isr_1 interrupt */
}
int main()
{
/* Enable Global Interrupts */
CYGlobal IntEnable ;
isr_1_StartEx(isr_1_fun) ;
/* start the LCD display */
...
==========================
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Motoo - Thanks for the suggestion. I've done several PSoC designs using DMA and interrupts. This design is a bit different. MAIN calls a subroutine ModulatorLoop that has ISR. So MAIN is not calling the ISR in my case. Something fails in setting up the ISR. Rather that restructure all my code I'd prefer to make this topology work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Paul-san,
I'm sorry for my short sight, yes you were initializing the isr in ModulatorLoop().
Another thing I've encountered before is
the InterruptType of the isr.
Currently your isr_1 is set to DERIVED.
How about trying RISING_EDGE or LEVEL
as you have already confirmed that the signal is alive.
TYPE == DERIVED
TYPE == RISING_EDGE (I hope this is the right one...)
TYPE == LEVEL
Best Regards,
9-Nov-2018
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Paul-san,
Wow, it's getting very tough!
Two things, I'd like to try if I were you, are
(1) set a break point at
isr_1_StartEx(DMA_1_isr_handler) ;
and make sure this is called.
(2) Just like before, moving CY_ISR(DMA_1_isr_handler) { ... } and isr_1_StartEx(DMA_1_isr_handler)
into the main.c, early part of main() and see if it makes any difference.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Motoo - Yes isr_1_StartEx(DMA_1_isr_handler) is called. I will try moving the ISR to main. thanks for the suggestions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Paul-san,
I've been studying your project, some other things I noticed are
(1) From your problem description
>> CY_ISR(IntDefaultHandler)
This seems either assigning your handler have failed
or handler for isr_1 has been re-assigned to IntDefaultHandler.
(inside the isr_1_Stop(), isr_1_SetVector(&IntDefaultHandler) ; is called )
You may be able to use isr_1_GetVector() to confirm which address is assigned to isr_1.
(2) You wrote 50ns pulse, but your bus clock is 36MHz.
As 1/50ns = 20MHz, may be you need to sample it with 40MHz or faster.
You might be able to try put SR-FF after DMA_1 so that pulse will be level.
Sorry for being a scatterbrain, but these are what I could come up with.
Best Regards,
9-Nov-2018
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Paul-san,
I'm glad hearing that you problem was solved!
Although my first response was pretty useless,
if any of later message(s) could provide you some hit
I would appreciate your marking it as helpful.
Anyway, have a nice weekend for you, too!
Best Regards,
10-Nov-2018
Motoo Tanaka
P.S. I was working at 1501 Page Mill Road
as a lab engineer from 2000~2002 😉