Electronic – How fast can ARM Cortex M0s/M3s bit bang

armbit-bangcortex-m0cortex-m3

I have not yet used ARM Cortex uCs, only AVRs

Firstly, how fast can they:

  1. Stream 1024+ bits (serially, from bytes in RAM) out of a pin, with no pauses/jitter
  2. Stream 1024+ bytes (parallel, from RAM) out of 8 pins, with no pauses/jitter

I'm expecting answers in the form of X clock cycles per bit/byte, but I could be ignorant of how the ARM chips work. Are there non-deterministic timing issues with e.g. the L1 cache (if it even exists on those chips)?

Secondly are one or both of these jobs done better by some integrated peripheral (SPI, USART) commonly found on ARM uCs?

I'm particularly interested in the LPC1114FN28/102 if that makes any difference. I am not uC electronics professional, it's just a hobby.

Best Answer

If I read the SPIO0/1-with-SSP chapter correctly using the TISS format (fig 36 in my rev 12 copy of the user manual, link to newer version) can send out a continuous bit stream. The maximum clock rate seems to be PCLK / (CPSDVSRx(SCR+1)), for 48 MHz, CPSDVSR=2 (seems to be the minimum) and SCR=0 (default) this would give 24 MHz.

Were are you going to find the data to clock out at that speed? This poor chip (OK, it is my favorite!) has only 4K RAM and 32K FLASH.

Related Topic