This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2F: CC2640R2 programming problem

Part Number: CC2640R2F
Other Parts Discussed in Thread: LAUNCHXL-CC2640R2

We have made progress and can access the CC2640R2 processor on our custom board.  We can even display the chip's MAC address with the TI programmer code.

We are using CCS and the i2ctmp116_CC2640R2_LAUNCHXL_tirtos_ccs program.  We are well aware that this project is directly related to the relevant TI SDK board, which we have, but when we try to download the program to flash on our board (by clicking on the debug icon to compile and download the code), we get some indecipherable error messages.

We'd expect the the code would not completely run the different hardware on our board, but it seems logical that it should nevertheless download the compiled code to flash.  The plan is to modify and evolve that project's code to fit our board, since writing a project from complete scratch seems to require a PhD in TI's sea of various includes, build files, etc.

We are using the same CC2640R2 family of processor, but it is a different and smaller package than the CC2640R2 on the TI SDK board.

We get these messages when we try to download the code to our board:

Error connecting to the target
(Error -242 @0x0)
A router subpath could not be accessed
The board configuration file is probably incorrect
(Emulation package 8.1.0.0007)

A basic question is what is a router subpath?
Another question is where is the board configuration file, and how do we change it?  When I do a file search for 'board configuration' or 'boardconfiguration', I can find no such files in any TI folder on my computer.

The problem with a vast and complex infrastructure such as TI's vast data base of various processors and complex software to handle it all such as CCS, is that one small change made by a beginner, such as trying to download code to a custom board, rapidly leads to confusing and obscure error messages.  It's easy to stray into the 'weeds' and get totally lost.

Any help would be appreciated.

Dan Benkman
Innowave

  • This issue is usually caused by bad jtag connection. If you use Flash Programmer 2, can it recognize your CC2640R2F?
  • Since you get "The board configuration file is probably incorrect" I would assume that this is the main issue.

    - It sounds like you are using a 4x4 or 5x5 packet for the CC2640R2. Please verify. Do you use the F128 version?
    - Since a 4x4/ 5x5 packet does not have the same amount of IOs as a 7x7 which the LP uses, modify the board file to only use pins that exist on your hardware. Set the others to PIN_UNASSIGNED.
  • What you say about the use of nonexistent pins on the smaller package makes sense, but somewhere in the code there must be some kind of ID check that the code uses in order to download to the correct chip.  It won't even start to download to the smaller chip, and there's a 99.999% chance that it's because the smaller chip has a different chip ID than the original chip the firmware is looking for.  I strongly suspect that it compares chip IDs and can't find the right one. The question is what file (hopefully a file that actually exists) is that information in, and what do I change it to?

    Thanks for your help.

    Dan Benkman
    Innowave

  • Could you state exactly which chip you are using (full order number?)
  • The complete number on the schematic is CC2640R2FRHBR. It looks like the specific package is RHB.

    It seems logical that there would be a place in some (currently unknown) file that would replace the unknown ID of the TI board's processor with some number that contains 'RHB'.

    Thanks for your help,
    Dan
  • Hi Daniel,

    Answer Yikai's question. How do you connect the JTAG debugger to your CC2640R2F Launchpad?

    Post edited . . .

    It seems you are downloading your code using Code Composer Studio. Do a JTAG test using CCS.

    -kel

  • The Flash Programmer 2 easily recognizes the chip. Since I posted this problem, we tried downloading the object code to our board (with the RHB chip) using the Flash Programmer 2, and it programmed it fine. The file is called i2ctmp116_CC2640R2_LAUNCHXL_tirtos_ccs.out.

    This is a further clue that CCS is searching for the right chip ID to download the file to, can't find it, and so reports an error. Flash Programmer 2 doesn't care about the ID, and just downloads it.

    The problem, of course, is that we want to use breakpoints, etc, to debug our code, so we can't just use Flash Programmer 2 for test and debug.

    It seems like there might be two possible solutions to this problem. One would be to somehow tell CCS to download the code even if the IDs don't match. The other would be to find the 'magic file' that contains the package type and change it to the RHB package type.

    Both of these solutions seem to be extremely simple in concept, but exceedingly difficult if not impossible to implement.

    By the way, we are using the two wire JTAG from the LAUNCHXL-CC2640R2 board. We removed the jumpers on the two JTAG signals on P4 of that board and connected them to the JTAG inputs on our board. Again, it works fine with Flash Programmer 2.

    At this point, since we can successfully download the code to our board using Flash Programmer 2, it looks like it's not a JTAG or hardware issue. It is simply that CCS won't download the code because the IDs don't match. Again, it should be simple to change the target ID in the source code, but it appears to be exceedingly difficult to find it.

    Does anyone know the 'magic file' to modify, and exactly what to change the ID from and to to get it to work with our RHB chip?

    Thanks,
    Dan
  • Can you take some picture to show us your jTag connection between debugger and your custom board?

  • I am currently away from the hardware. I will contact someone who can take some pictures.

    Can you explain a possible wiring error that will allow Flash Programmer 2 to both talk to and download code to our board, while simultaneously making CCS get an error and NOT download code to our board?

    Thanks,
    Dan
  • If you use long JTag cable (>10cm), it might cause this trouble.
  • OK, we can try to shorten the cables. But isn't in MUCH MORE likely that CCS is seeing the wrong package ID and so won't download the code?
  • I don’t think it lis ikely that CCS is seeing the wrong package ID and so won't download the code
  • Could you check that the CCS project is setup to use cJTAG:

  • It is running cJTAG. But we tried lowering the JTAG TCLK clock frequency to 100KhZ, and it successfully talked to our board!

    I want to thank everyone for their suggestions, especially YiKai Chen, who kept insisting that it was a hardware issue rather than a board ID issue. Thank you for getting us to pursue a hardware solution!

    I will click on 'This resolved my issue', but I now have firmware question. I will open a new E2E question for it, but I will ask it here, as well:
    When we download code, even to the original TI board, if we try to read the registers, in particular the GPIOs, we get Error: Unable to read.

    We select 'Registers' under the 'View' menu, and then expand GPIO. We get the same error message on most registers. How can we read the registers?