Saturday, 14 March 2009

change of processor ?

Like I told you in the previous blog I still had to find a suitable processor to implement the FIR filter. This means basically having enough performance to do a FIR calculation within the sample rate. I knew that a DSP was not reachable so I had to continue looking for a reasonable alternative with respect to speed , price and software availability. One day my eye felt on the cortex STM32. A friend of mine was already experimenting this target and he told me that the cortex was indeed a great core. I did some additional searches on software (IDE, libraries ,..) and it seemed that this was very promising. I saw that the RIDE7 environment (raisonance) was totally free of charge. It works with a gcc distribution of codesourcery and can work under windows. Meanwhile I searched also for a starter kit and found exactly what I was looking for at www.olimex.com. Cherry on the cake was that the ST people also wrote a DSP extension library for the cortex. That seemed very promising to me. I ordered the development board already.

In my previous blog I also spoke a bit on my FIR simulation. If you are interessed in the python code you can get it via my publishing corner:

http://sites.google.com/site/guyvo67/


At the picture on the left you can see the main sinus with the CAB signal on. This was the first thing I did reproducing the signal that caused the flickering as realistic as possible. The drawing was done with a simulated frequency of 40khz. Now I had my input signal it was time to integrate the FIR calculation. I experimented first with the java applet to get an idea on bandwidth and amount of taps. Than I copied the tap values into my python simulation. The calculation for FIR is rather simple. They exist out of set of MACs.(multiply/addition accumulations) So it was pretty easy in python to make the MACs. On the second picture you can see the result taken from a test with 20000 points and weak 6 order tap. In blue you can see the filtered signal which was already pretty nice for a start. I noticed that with increasing the taps you also increase the phase shift. But this shift is constant over the all signal. This can be considered as great advantage as I had to trigger the zero point most accurately. This effect can be seen on the third picture.

At that point my brand new development board was arrived. you can take a look at it on my cortex dedicated blog:

http://guyvo-cortex.blogspot.com/

My first thing I did with the cortex was as you could guess dive into the DSP function library. I did some quick tests using the RIDE simulator on performance. That moment made me very happy because it was only 7µs to calculate a 32 tapes FIR filter !!! At that particular time I was 100% sure to change my target from AVR to the CORTEX STM32 running on 72MHz. If you are curiuos on the real tests and how I did it you must switch to my cortex blog. So because the AVR story is almost ended here I will finish writing a next short blog on the master with OLED display.

No comments: