williamk wrote:Thanks for the info.
Some other questions.
1) the One-Time-Programmable memory, is it like write-once, and can't erase write again?
2) does a blank chip already come programed to boot from the SPI, or is that why I need the XTAG2 adapter, to program that and the SPI?
I would like to point out that for beginners, it should be an easy way to handle XMOS chips, that would open a whole new market on low-end DIY dummies like me. ;-) Maybe an XMOS Lite IDE with an easier XMOS PCB Kit? Just an idea. ;-)
Txs again.
William, yes, the One-Time-Programmable memory can only be written once - it's in the name!
It may be possible to write only part of it, as flash memories usually read as 0xff when blank. I've not checked to see how the Xcore OTP reads when blank. This is unlikely to help you, though(see below)
The XMOS OTP is 8K bytes so is only suitable for a small program. Many designs may not ever use it.
Blank XMOS chips can be configured to boot from an external SPI flash device by wiring the boot mode pins appropriately, not requiring any other programming.
The XMOS XTAG2 is very reasonably priced now at $19 on Digikey rather than $50 on Sparkfun.
You will need to have a programmer of some sort to program your blank SPI flash, and the XTAG2 is as cheap as any.
The XTAG2 also allows you to load programs into the internal RAM memory of the XMOS chip for testing(via JTAG) This does not require writing to a flash device. This is very handy as it means you only need to write the flash device later when you've tested your code and got it right.
You are well advised to purchase a development board XMOS/Sparkfun. The beginner is unlikely to make much progress purchasing just a blank chip on no board. The XTAG2 can be bought paired with a development board.
Old hacker's note:
Programming flash memory bytes as 0xff means that those bytes can be rewritten at a later time with any value.
Previously used bytes are removed by using a NOP Opcode. This is one of the reasons why many microprocessors used to assign the opcode 0x00 or 0x0000 or 0x00000000, as appropraite, to the NOP - no-operation CPU opcode.
It is most unfortunate that on the XMOS architecture the opcode 0x0000 codes for
The value of register r0 after power-up will either be 0x00000000 or undefined on CPU power-up.
This means that execution of the stw (2rus) r0,r0[0x0] instruction will cause a runtime ET_LOAD_STORE exception, meaning this favourite hackers' scheme will fail on the XMOS OTP.
I employed this trick way back when EPROMs with windows had to be zapped in a UV box taking about 10 minutes and came in Intel 2764 8K sizes(a bit like the XMOS OTP, in fact). Blank EEPROMs also read as 0xff.
Max.