I’m using the Fez Hydra to read and write the digital IO’s as fast as possible. I use RLPlite to load a c-file compiled by Keil uVision. The c-file initializes the GPIO port in c and then toggles the port in inline assembler.
Since the processor is clocked at 200MHz and the STR assembly instruction should take 1 cycle to complete, I expected to see about 100MHz when toggling a pin in assembler (1 STR to clear and 1 STR to set the port). But I am only seeing 8,3MHz => 12 cycles per STR instruction. Am I missing something? Is this the maximum read/write speed we can achieve in the Fez Hydra? Can I disable/enable something in the c-code/assembly to speed up the processor? Will it run faster if I boot the processor from a SD-card without the NETMF?
Just a thought and I have no idea how hard this is, but can you write the data in parallel to the output port and use a serializer/deserializer IC to convert it to and from a serial stream?
The Hydra AT91SAM9R64 chip has 4 32bit Parallel IO ports and i’m sure it probably takes the same number of CPU ticks to write all 32 as it does just one. Hence in theory you could get a 32 times speed boost.
Just for your info, I bought a STM32F4 Discovery board and within minutes I was up and running, toggling the pins at 168MHz giving a nice square wave of 86MHz. So this should also be possible at your Cerberus boards.