Need ideas for testing IO library on C3
jhh
Posts: 28
I've been working on some objects for working with the C3's on-board hardware, and am trying to think of a good test of it.
The whole intent of it is that a cog controls the SPI bus, and ensures mutual exclusion to it.
So before I unleash this (highly derivative) work unto the world, I'd like to give it a good workout.
So I thought I would ask and see if anyone has any ideas for something that:
- could be spread across a few cogs
- would involve at least two, preferably more, of the SPI devices on the C3
- can be verified in some way at the end.
The best idea I have so far involves
CogN - reads some files from SD, stuffs the data through a ring buffer in the SRAM
CogN+1 - reads from the ring buffer in SRAM, writes to flash
CogN+2 - reads from the flash, writes to serial, and thats the stream we checksum and verify
I know... boring!
Anyone have a better idea for a test using that onboard hardware?
The whole intent of it is that a cog controls the SPI bus, and ensures mutual exclusion to it.
So before I unleash this (highly derivative) work unto the world, I'd like to give it a good workout.
So I thought I would ask and see if anyone has any ideas for something that:
- could be spread across a few cogs
- would involve at least two, preferably more, of the SPI devices on the C3
- can be verified in some way at the end.
The best idea I have so far involves
CogN - reads some files from SD, stuffs the data through a ring buffer in the SRAM
CogN+1 - reads from the ring buffer in SRAM, writes to flash
CogN+2 - reads from the flash, writes to serial, and thats the stream we checksum and verify
I know... boring!
Anyone have a better idea for a test using that onboard hardware?
Comments
0) On power up, check for a new bitmap on the uSD card. It no uSD goto 2) and display previous image from Flash memory
1) Read a bitmap of up to 1MB from the uSD card, write it to flash on the C3
2) Read a portion of the bitmap (perhaps a scrolling portal window of the bitmap) into the SRAM
3) Display the SRAM on either VGA or TV
4) Calculate an intensity histogram of the image, send that out the serial port to verify that serial works.
5) Got back to 2) and move/scroll that portal window around the larger bitmap.
You could then always extend it to a kind of slideshow viewer, and add Jpeg decoding, etc if you like, or put it in the Obex for others to build upon
Just my 2c