On the ARM Cortex-M3 96MHz mbed, I was able to SPI write out 3456 bits of data at 1.6kHz — plus some integer math and memory look-up time. How fast is the XMOS, where each core is clocked at 400MHz, four times the speed of the mbed? Here’s my XMOS code, which does SPI writes in 32-bit chunks. There is no hardware peripheral specifically for SPI, so you have to make use of their buffered I/O ports.
I clocked it at 2.5kHz (108 transfers of 32-bits), which isn’t that much faster than my mbed code. The mbed had serial at 16MHz, but the XMOS code is 12.5MHz, so the comparison isn’t 100% fair. Below is the main code that writes out data. Note that the XMOS has to do some extra work for each transfer. Reconfiguring the port seems to take around 1 us, which is a waste of time.
Of course, the majority of the time is spent in the serial transfer itself. If there were absolutely no overhead, the maximum transfer rate would have been 12.5MHz / 3456 = 3.61kHz. The nature of XMOS buffered I/O and SPI mode 0 adds around 30% overhead.
void send_word(unsigned int data) {
//check MSB of data and set MOSI line accordingly
//skip check if you need SPI mode 3, and set clock pattern to 0xFFFFFFFF
if (data & 0x80000000)
configure_out_port(mosi, blk2, 1);
else
configure_out_port(mosi, blk2, 0);
//reverse data to big endian order
mosi <: (bitrev(data) >> 1);
//clock pattern
sclk <: 0x55555555;
sclk <: 0x55555555;
// wait until clocked output operation is finalized.
sync(sclk);
}


These can help not only with the pain, but also with the inflammation.
Most people may not realize that medication inserted
into the rectum is likely to be absorbed into the blood stream and circulate
throughout the body. The fiber will soften your stools, making it easier to pass
without excruciating pain.