Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:cff63309a8af, committed 2013-07-08
- Comitter:
- avbotz
- Date:
- Mon Jul 08 03:58:56 2013 +0000
- Commit message:
- Initial commit.
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Jul 08 03:58:56 2013 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "dsp.h"
+
+Serial pc(USBTX, USBRX);
+DigitalOut myled(LED1);
+Timer tim;
+
+int main() {
+ unsigned int i = 0;
+
+ q15_t lad[5], ref[6];
+ q15_t state[1029], in[1024], out[1024];
+ // this loop takes 4 assembly instructions to run per cycle
+ // http://www.wolframalpha.com/input/?i=%282731+us%2F65536%29%2F%281%2F24000000Hz%29
+ arm_iir_lattice_instance_q15 filter = {5, state, ref, lad};
+ tim.start();
+ while (i<100)
+ {
+ arm_iir_lattice_q15(&filter, in, out, 1024);
+ i++;
+ }
+ tim.stop();
+ pc.printf("%d us\n\r",tim.read_us());
+}
+//mbed LPC1768 runs at 96 MHz
+//2731 us=65536 cycles
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-dsp.lib Mon Jul 08 03:58:56 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-dsp/#fdd22bb7aa52
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jul 08 03:58:56 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/5e5da4a5990b \ No newline at end of file