Go Down

Topic: linking with libarm_cortexM3l_math.a ? (Read 6 times) previous topic - next topic


Just spent half an hour trying to figure out why it wouldn't compile before I realized I still had the board selected as UNO ... (facepalm)

Anyway moving on. Just to confirm did I also need to modify the board.txt file as per what raalst tried first or was the change to the platforms.txt all that was needed? I've changed both and it's working like a dream but I won't leave board.txt modified if the change wasn't needed.

I've been finding and comparing different PID and FFT libraries for the DUE and to have them so neatly pre-packaged and (according to the docs) cortex optimized is way beyond what I expected to get, so big thanks raalst & cmaglie. I'm going to be trying to FFT a piezo sensor input to identify vibration modes in machinery as a fault finding/early fault detection system. If I get it right I'll make a post for it.


Rocket science is easy, it's all this electrical stuff that gets me.


Only platform.txt needs to be changed, as per cmaglie's post.

Just to reiterate what I said before - I've now had this modification for 2 months and have used the IDE heavily and have had absolutely no problems or incompatibilities at all with sketches not using the library. I would recommend this change to be included in the next IDE release.


Apr 14, 2013, 01:43 pm Last Edit: Apr 14, 2013, 01:45 pm by raalst Reason: 1
Nice to hear the post has been useful.

I'm making good progress attaching a mic, sampling it and displaying the FFT on a simple 128x64 glcd.
this requires use of the ADC, use of the DMA (pdc), the dsp library and U8glib. and a lot of large arrays.
but it still fits.

I created my own constants to refer to the registers, just to be sure to understand the datasheet

the DMA is freerunning, the sampling rate controlled by the prescaler value.
when needed I ask the PDC to get an array worth of ADC data, then busy-wait for the array to be filled.
after that FFT and display.  

I am confused by the large amount of clocks in the system. it is correct to assume MCK is 4 Mhz in the DUE ?
does anybody know for sure ?
I do see FFT output, but relating it to frequencies is out of my league and currently done by running
the baudline (great piece of software !) tone generator at a known frequency in my PC.

current code (as an example, quite possibly of "how not to program"..) : see attachment


Great work raalst.  I would hope that DMA sampling could be rolled into a library some day.  Sooner than that I'd hope the Arduino Team would support formally some of the ARM libraries like the math one which includes the FFT - the power and code is already there, just make it easier for the development community to use it in the same spirit that has been done for other platforms.


Good links deserve plugging :
this link is about the only one I found that goes into any detail on the DUE ADC capabilities and settings

Go Up