- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attached is my project. I want the code in main{ } to execute after the DMA_Ch_A and DMA_Ch_B filter channels are complete. My two filter DMA TDs load 2040 samples into each memory location. The interrupts are named isr_dma_A and isr_dma_B. I declared two volatile unit8 Done flags as global variables but I cannot find any Done flags in the build workspace. What flag will be set by the ISRs when transfer to memory arrays is complete?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When posting a project please use Creator -> File -> Create Workspace Bundle and attach the resulting .zip-file. I cannot open your project right now.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When posting a project please use Creator -> File -> Create Workspace Bundle and attach the resulting .zip-file. I cannot open your project right now.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to set these flags manually. The default ISR is just empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks to hli I now understand your question.
The isr-component is just a placeholder to handle an interrupt, so that you do not have to mess around with interrupt controllers or other core hardware. But the isr component has to be initialized. My preferred method is
CY_ISR_PROTO(MyHandler); // Declare prototype of my interrupt handler
CY_ISR(MyHandler) // interrupt handler
{
// Do what needed, ie set flags
// Do not forget to remove the cause of the interrupt
}
and later the initialization:
isr_StartEX(MyHandler);
Bob
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Bob. I have moved your code suggestions into my project and it builds fine.
I like how you #define forever = TRUE. Kinda like the old song "love forever true." I do get an Information message that my pin with bypass capacitor on P0[4] is not connected. It is locked to P0[4] pin 53 on the chip in the cydwr, though. If there is anything else I should do on that pin, let me know. Otherwise, over and out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In your schematic you must remove the Pin1!! That is a real pin and its settings will conflict with the settings for the bypass cap.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So I eliminate Pin_1 and just connect the bypass capacitor between P0[4] and ground! and don't bother to tell PSoC Creator about it, right? I only ask because the SAR seq data sheet says the pin should be a high impedance input. Maybe that's what it is by default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An analog pin is by default Hi-Z. I would, however, encourage you
always to look at a components setting vs rely on memory what
settings default to.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you DanaKnight. When I don't force any pin to be the bypass, the build selects P0[2] opamp+ and labels it ADC_SAR_Seq:SAR_Bypass. So that looks like the natural choice for the bypass capacitor. Thank you all for the help. Over and out.