What ISR Done flag am I looking for in output from filter?

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.
JeCo_264681
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

 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?

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

View solution in original post

0 Likes
10 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You need to set these flags manually. The default ISR is just empty.

Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

lock attach
Attachments are accessible only for community members.
JeCo_264681
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

 Sorry about that, Bob. I have attached the zip file in case you want to comment further. I'll take a look at the other answers and see if I can figure it out. Stay tuned.  I'll close the question after I tinker with it. Thans.

0 Likes
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I commented your code, look for "//**Bob"

   

 

   

Bob

JeCo_264681
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

 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.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

JeCo_264681
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

 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.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
JeCo_264681
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

 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.

0 Likes