DSP library for the LPC11xx (Cortex-M0)?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DSP library for the LPC11xx (Cortex-M0)?

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by StuartMW on Sun Feb 14 09:49:09 MST 2010
I've heard that NXP is working on a DSP library for the LPC11xx, that is Cortex-M0, family of processors. Anyone know anything about this or a 3rd party library.

I'm wondering if there's anything to implement FIR and IIR filters plus FFT's.

In my application the LPC11xx would be an ideal fit (we currently use an 8-bit PIC) for both price and performance but we'd like to do "real" math.
0 Kudos
Reply
15 Replies

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by StuartMW on Tue Mar 02 17:10:06 MST 2010

Quote: igorsk
M3 doesn't have any inherently "DSP" instructions either...


The M3 core has the MULA plus some other multiply-accumulate instructions. The M0 only has the MULS (32x32==>32 multiply) but that's done in a single cycle so the MULA ==> MULS + ADD isn't a huge difference in execution time.

That said the ST and NXP Cortex-M3 libraries use many load/store instructions not supported by the M0. That's where the majority of any conversion work lies.
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Tue Mar 02 09:15:27 MST 2010

Quote: leon_heller
One problem with using the M0 for DSP is that it doesn't have any DSP instructions, like a MAC. I can't find any in the instruction set, anyway.


M3 doesn't have any inherently "DSP" instructions either. You can still do DSP without them, if less efficiently. A MAC instruction can be emulated with a multiply and an addition. It might be a bit slower and in some cases less exact, but perfectly suitable for many cases.
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by leon_heller on Tue Mar 02 06:39:10 MST 2010
One problem with using the M0 for DSP is that it doesn't have any DSP instructions, like a MAC. I can't find any in the instruction set, anyway.
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rkiryanov on Mon Mar 01 13:06:54 MST 2010

Quote: igorsk
I don't think M3 to M0 would be much harder



M3: umull/smull (64 = 32 x 32), udiv/sdiv
M0: muls (32 = 32 x 32)
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by StuartMW on Mon Mar 01 10:47:50 MST 2010

Quote: igorsk
I could port STM's Ivan Mellen's libs to ARM7 with a couple of macros, I don't think M3 to M0 would be much harder (though naturally somewhat slower)...


NXP's library, just as ST's, is macro based so yes it could be modified to run on an M0. However that takes time and effort.

If the competition offers an M3 based part for about the same price and free DSP libraries are provided then I'll go with that assuming everything else is equal.

These days its not enough just to have the silicon. Development times are short so the more support a manufacturer provides the better. In the case of the LPC11xx NXP isn't providing much in my application.
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Mon Mar 01 08:23:08 MST 2010

Quote: StuartMW
Yes, I have the NXP M3 DSP library (from my local NXP salesperson) but cannot distribute it. The code is very similar to ST's.


Still no reply for me. Looks like if you don't promise to buy tons of chips you're not considered a customer :/

Quote: StuartMW

I'm also told that NXP has no plans to do the same for the M0 at this time. That's too bad for lower-end cost sensitive applications such as the one we were considering the LPC11xx for.


I could port STM's Ivan Mellen's libs to ARM7 with a couple of macros, I don't think M3 to M0 would be much harder (though naturally somewhat slower)...
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by StuartMW on Sun Feb 28 12:43:54 MST 2010

Quote: igorsk
Any luck? I only got the automated reply so far...



Yes, I have the NXP M3 DSP library (from my local NXP salesperson) but cannot distribute it. The code is very similar to ST's.

I'm also told that NXP has no plans to do the same for the M0 at this time. That's too bad for lower-end cost sensitive applications such as the one we were considering the LPC11xx for.
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kendwyer on Wed Feb 24 22:01:50 MST 2010
Hi,
NXP will post portions of the M3 DSP library on the website in the next week or so.
The libraries have been written in assembly and optimized for M3 so there would be modifications required to get it to work on M0.
Regards,
Ken
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ktownsend on Tue Feb 23 16:54:56 MST 2010

Quote: StuartMW
Since they provide (C & assembler) source it should work on any Cortex-M3.



I think that's the reason NXP is probably holding their cards close to their chest on this ... because it's something thats so easy to steal, and there's definately some added value in a SW solution like this, particularly if it's been well tested to ensure the best possible performance.
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Tue Feb 23 10:11:01 MST 2010

Quote: StuartMW

Thanks for the info about the 13xx & 17xx library. I've request it.


Any luck? I only got the automated reply so far...
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by StuartMW on Mon Feb 15 13:19:55 MST 2010
Thanks. I tried the ST DSP library demo on a STM3210B eval board this morning and it works fine. Since they provide (C & assembler) source it should work on any Cortex-M3.

Thanks for the info about the 13xx & 17xx library. I've request it.
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Mon Feb 15 08:43:57 MST 2010
Just found on NXP's site:
AN10913 DSP library for LPC1700 and LPC1300, V1 (Feb 10, 2010)
And
"LPC13xx and LPC17xx DSP Libraries (Available on Request; Please Use the Support Form to Request the File)"
No plans for M0, apparently. But I think it shouldn't be that hard to port.
0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Sun Feb 14 15:54:53 MST 2010

Quote: StuartMW
I already have the ST library (have used an STM32 in a project). The license agreement states its for use with an ST part only.
(Yeah and I'm one of those weird honest people that honor license agreements).


Does it? The only thing I could find in the docs (and I had to look, it wasn't really obvious) was this:

Quote:

License

The enclosed firmware and all the related documentation are not covered by a License Agreement, if you need such License you can contact your local STMicroelectronics office.

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by StuartMW on Sun Feb 14 12:21:47 MST 2010
I already have the ST library (have used an STM32 in a project). The license agreement states its for use with an ST part only.
(Yeah and I'm one of those weird honest people that honor license agreements).


Quote: igorsk
There is a library from ST which might be used with a little adaptation (as M0 is missing some instructions present in M3), and an M3 FFT implementation from Ivan Mellen.

0 Kudos
Reply

2,895 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Sun Feb 14 11:41:17 MST 2010
There is a library from ST which might be used with a little adaptation (as M0 is missing some instructions present in M3), and an M3 FFT implementation from Ivan Mellen.
0 Kudos
Reply