Hi
I wrote code for both the RIT/Ticker using the mBed ADC lib. Both have (many) spikes.
Besides that I used Timer1 code issuing small DMA transfers posted elsewhere on the forum. This one also had spikes.
Lastly I used code that uses Timer1 code that triggers the ADC by the MAT1:0 pin (using the timer match functionality). This code ran flawlessly for 30.000 * 2 * 100 samples (took several hours, including the data transfer).
But more riddles: When I removed the other three pieces of code (not nessecary anymore) the Timer1/MAT1:0 code suddenly started to show spikes.
I'm currently in the process of comparing sources before and after this change line by line to see where a cause might be and to find a clue.
wvd_vegt
This is probably somewhere on the site but I've been looking awhile and haven't found it yet. I'm trying to make it so that it samples one of the analog ports at a certain frequency. No matter what it is doing at the time, it must sample that port if its time for sampling. I am trying to make a program that will be doing two task at once. One task is just overhead of waiting for a person or another processor to ask them to do something and when they are asked, they do it but no matter what it is doing/what stage the process is in, when its time to take a sample, it must take one. If the process it is doing is transferring data over another port then it must be able to do both at once if it is at a point it can't stop. It will also be processing the sampled data in the background.
My question is how do you get it to do this and how do you set up the A/D converter to the correct parameters.
Note: The A/D converter is getting its input from a microphone that has been amplified and filtered.