- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
So i am doing a adc conversion via DMA which is triggered by a timer and Starts on an ISR which goes off on the start of the PWM Period.
My problem now is that sometimes my DMA interrupt works, then it doesnt as soon as i do something like insert a line which has nothing to do with the transfer like getting a timer value. Sometime when i set different Breakpoints it then startsto work again like it should but then again it bugs out as soon some minimum changes are made.
I have revised my code dozens of time but i´m not able to locate an error so i'm asking you guys.
Thank you in advance
Joe
*UPDATE* I am using the PSOC5 LP Prototyping Kit CY8CKIT-059
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome to the forum, Joe!
You are a bit near at the edge of the chip performance with 1.25Msps of the ADC and 20000+ interrupts per second. I would suggest to control using a logic analyzer and some pins you trigger if your device programming is capable of that speed.
Bob
PS: Where in Germany are you located? I live near Bremen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm in Baden-Würtemberg so thats far away plus this is kind of a study for my workplace(im a student) so direct help wouldn't be possible because i'm controlling classified electronics with the controller the code I provided is just some basic testing and calculation.
I already used a logic analyzer for displaying my adc results etc. but I need to be able to evaluate how long the programm needs for calculations and sampling for the study.
So if i got too much interrupts toning down sampling rate of the adc and the trigger-timing would help to be able to properly debug using the creator?
*UPDATE And just for Clarification my only interrupt which has issues is the DMA one ... all other interrupts trigger as they should and even reducing the interrupts to a minimum by just using continious mode and removing the adc_trigger ISR doesnt help either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can in the line
adc_conversion[periodeAnz-j+i*periodeAnz] = (((2*adc_i_samples
at j==0 and i == 50
a write outsides the array happen?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It shouldn't be possible to get into the loop at i=50 since at i=49 the loop increments i at the end of the for loop and then checks if the statement i < sample_pro_periode returns true which at i=50 is not the case so it exits the loop.
Greetings,
Joe