Class to be able to send SPI data with almost no overhead, useful at very high speeds.

Dependents:   MakerBotServer epaper_mbed_130411_KL25Z epaper_mbed_test epaper_mbed_test_copy1 ... more

General

BurstSPI sends SPI data without reading it back, allowing higher speeds than the regular SPI library. This is mainly useful at high frequencies and large payloads. With a small number of bytes the setting up and finishing time will remove any advantage.

The three new functions compared to regular SPI are: fastWrite, setFormat and clearRX.

fastWrite is the function to quickly write data. setFormat is only required if the SPI format might have changed, or the first time you fastWrite something and you haven't used a regular SPI write before. clearRX is required if you also want to be able read from the SPI peripheral later on.

//Send 1000 SPI packets as fast as possible
spi.setFormat();
for (int i = 0; i<1000; i++)
    spi.fastWrite(data[i]);
spi.clearRX();

Supported targets

  • KL25Z, KL46Z
  • LPC1768, LPC11u24, LPC1114, LPC1549, LPC1347
  • STML152RE

If a target is not supported the library will issue a warning, and use regular writes. This means if you for example use this library to speed up writing to an LCD display, your LCD display library will work on all targets, and if possible BurstSPI will speed up the process.

History

Added STM F4XX support. default tip

2015-05-16, by Sissors [Sat, 16 May 2015 11:09:59 +0000] rev 13

Added STM F4XX support.
;
; (And seriously STM, it has the same SPI as the already supported L152, but you just had to go ahead and change all your driver files)


As we set receive ignore flag we don't need any code in clearRX.

2015-04-03, by Backstrom [Fri, 03 Apr 2015 06:14:57 +0000] rev 12

As we set receive ignore flag we don't need any code in clearRX.


Add LPC1549 target support.

2015-04-03, by Backstrom [Fri, 03 Apr 2015 06:02:58 +0000] rev 11

Add LPC1549 target support.


Added support for non-supported targets

2014-10-07, by Sissors [Tue, 07 Oct 2014 10:55:42 +0000] rev 10

Added support for non-supported targets
;
; Lib will revert back to regular SPI, so if this lib is integrated in a larger one it will also allow people with other boards to use it (only slower)


Added LPC13XX in list of defines (does compile, not verified yet to work)

2014-10-07, by Sissors [Tue, 07 Oct 2014 09:00:51 +0000] rev 9

Added LPC13XX in list of defines (does compile, not verified yet to work)


Add LPC11U24 as target supported by LPC1768 code.

2014-09-03, by mcapewel [Wed, 03 Sep 2014 18:46:02 +0000] rev 8

Add LPC11U24 as target supported by LPC1768 code.


Add LPC1114 as target supported by LPC1768 code.

2014-08-05, by mcapewel [Tue, 05 Aug 2014 19:35:37 +0000] rev 7

Add LPC1114 as target supported by LPC1768 code.


Merge with version 2.0

2014-07-25, by kenno [Fri, 25 Jul 2014 15:09:45 +0000] rev 6

Merge with version 2.0


Add BustSPI_KL46Z

2014-07-19, by kenno [Sat, 19 Jul 2014 14:47:50 +0000] rev 5

Add BustSPI_KL46Z


Version 2.0

2014-06-25, by Alamalione [Wed, 25 Jun 2014 08:28:32 +0000] rev 4

Version 2.0