How fast is ...

10 Apr 2010

Where do I find the specs on the I/O speeds?

How fast is the SPI bus?

How fast is the UART?

How do I stream SPI data to the UART without stalling the data?

 

 

10 Apr 2010

User Manual

From the FAQ:

"The maximum SPI data bit rate is one eighth of the input clock rate. The SPI rate is the peripheral clock (PCLK) rate divided by the SPI Clock Counter Register (SPCCR) value. The value of the SPCCR must always be greater than or equal to 8. The maximum clock (CCLK) of the LPC17xx can be set to 100MHz and, since the peripheral clock (PCLK) can be equal to CCLK, the maximum SPI rate will be 12.5 Mbit/sec (100MHz/8)."

"The UART baud-rate is calculated as PCLK/(16 * divisor). The divisor is 16 bits long, so the maximum is when the divisor is 1. The maximum clock (CCLK) of the LPC17xx can be set to 100MHz and since the peripheral clock (PCLK) can be equal to CCLK, the maximum UART speed (PCLK/16) is 100MHz/16 = 6.25 Mbit/sec."

For direct SPI to UART transfer you can probably use DMA. From Chapter 31:

"GPDMA supports the SSP, I2S, UART, A/D Converter, and D/A Converter peripherals. DMA can also be triggered by a timer match condition. Memory-to-memory transfers and transfers to or from GPIO are also supported."

(SSP can be used in SPI mode)

10 Apr 2010

So if I'm transferring SPI to uart and run the SPI at 12.5Mbits and the UART at 6.25 Mbits then what does the code look like for this? I assume the SPI clock will have clock gaps during transfer. Something like this:

SPI CLOCK   _-_-_-_-_-_-_-_________________-_-_-_-_-_-_-_-______









UART CLOCK  __--__--__--__--__--__--__--__--__--__--__--__--__--
            <--SPI-byte-->
            <--------- UART Byte --------->

Is it possible to use the USB to transfer 24 Mbps? Or for that matter, is it possible to use the USB on the mbed board for anything besides a "memory" device? Is there a way to make the USB act like a high speed serial connection instead of a memory device?

Thanks in advance.