- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hii,
I am using 16 bit ADC and Transferring my data to Filter using DMA and Getting the result of filter in 16 bit. My concern is when I run the code it is not going into the loop. The code is exiting at while (Filter_IsInterruptChannelA() == 0) ; I attached the code please help me regarding this. My aim is to transfer 16bit output of ADC to Filter using DMA and get the 16 bit filter output.
Thank you
Hem k
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
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
There is no bug, but your indentation is wrong:
while (Filter_IsInterruptChannelA() == 0) ; // This is a loop waiting for something getting. see the ";" at end
Output=(Filter_Read16(Filter_CHANNEL_A)); // This will be executed after and is indented badly
I frequently use
#define Wait(x)
,,,and then this would look like
while (!Filter_IsInterruptChannelA() ) Wait();
Output=(Filter_Read16(Filter_CHANNEL_A));
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob, this is totally oblique to this actual thread (apologies to Hem for the distraction ... I too often wonder about the mysteries of DMA), but: Is there any way to get in contact with you outside of the forums? There is no private message option on this forum 😕
Don't post any contact info openly of course, it will get scraped for spam! But other than that, I don't know how to accomplish contact. Are you with Cypress, or on any other forum or social media that I could approach you through?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you get hands on one of my project examples you'll find an email address in main.c. I usually do not give advices that could be placed into one of the forums. So I am waiting for you getting in contact with me.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hii Bob Actually I tried doing the way you mentioned. But still the same problem exists.
Thanks
Hem K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hem, I tried to tell you that there is no problem. Your program runs as required.
If you are expecting something else, be a bit (or byte 😉 more specific.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can try this also-
if (Filter_IsInterruptChannelA() != 0)
Output=(Filter_Read16(Filter_CHANNEL_A));
else
CyDelay(3000);//fill value in CyDelay which is the upper value for which you wish to wait
The other may be that Channel A has not triggered a data-ready interrupt.,thus it is not going the the loop and stuck into statement "while (Filter_IsInterruptChannelA() == 0) ; "