Hello,
I am creating a custom programmer to utilize the two-wire debug lines on the CC2540 to load an image onto it. I am having problems with chip response through the debug lines during power-intensive operations such as chip erase or burst writes. The unit I am programming appears to program fine on the SmartRF programmer, and I have used a network analyzer to capture the bytes being communicated between the two. Most commands work and illicit responses from the target DUP which I have decoded and applied to the custom programmer. For example, I have captured:
55 00 | FF 00 //nop
56 E5 92 | FE 00 //move value from @0x92 to accumulator
57 75 92 00 | FF 00 //move byte 0x00 to @0x92
56 E5 83 | FE 00 //move value from @0x83 (DTPR0 high byte) to accumulator
56 E5 82 | FE 00 //move value from @0x82 (DTPR0 low byte) to accumulator
...which I have also replicated. However, much of these commands are non-essential, and I assume they are used by the SmartRF programmer for some purpose or another. When it comes to chip erase, however, the expected behaviour is:
0x10 0xFF 0xA2...0x34 0xA2...0x34 0xA2... etc. ...0x34 0x22
...where 0x10 = chip erase command, 0xFF = 8-bit cycle wait on target response, 0xA2 = target response (chip erase busy), 0x34 = status query, 0x22 = target response (erase complete). However, in my case,
0x10 0xFF 0xFF 0xFF 0xFF...<timeout after x seconds>
...or even if we force a status query, the target is still driving the line so a 0xFF is read. In our case, x is set to 3, and target voltage is set at 3.5V. I suspect insufficient power being supplied during the poll, but I can't find any specifications anywhere what the programming voltage and current draw requirements are.
Any input is appreciated, thanks.