All,
So I have built my own CC2540 board based on the keyfob reference design. I then attempted to flash my code using the CC Debugger and the SmartRF Flash Programmer. The Flash Programmer recognized the chip and would write to it but always failed the verify part of the "Erase, program, and verify" function. I have a couple theories but I would appreciate feedback from others.
Theory 1: The MISO and MOSI pins are reversed.
Looking at the keyfob reference design the debug header pin 8 goes to P0_3/MISO and pin 10 goes to P0_2/MOSI. After reading the CC Debugger Guide SWRU197E (which does not have anything specifically on 2540 or 2541) and looking at figure 5 it appears that pin 8 should be MOSI and pin 10 should be MISO. Also, figure 7 shows the CC2520 and it has pin 8 as MOSI and pin 10 as MISO. Table 7-1 of the CC2540 user guide also shows this mapping. Perhaps by design it is suppose to be reversed as to communicate back and forth but that is why I am asking the community.
Theory 2: Lock Bits are set and are blocking the program
Not sure what software/firmware comes on a new CC2540 from TI but should it be capable of being flashed right out of the box? Section 3.4.1 of the CC2540 user guide mentions that the CHIP_ERASE command from the debugger is needed to clear the debug-lock bit and flash_pages lock bit. However, my IAR trial has expired and I don't want to spend $3k to by the license to erase and download code that is currently good enough for testing.
Theory 3: I am missing a solder connection
The QFN package is a royal pain in the @$$ to solder by hand. There is a chance that I did not connect up every pin with adequate solder. However there is enough solder in place that the flash programmer can recognize the chip and attempts to program it. At some point I will hook up my oscilloscope to read the different lines. If it can reconize the chip does that mean that the DC, DD, CSn, Reset, SCLK, MISO, and MOSI lines are functioning properly?
Please give me your thoughts.
Thanks,
Tony