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: Toggle Pin on custom Board

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640

Hello,

I built a a PCB with a CC2640 device and now wanted to run some tests. As a first attempt I ran the empty.c and just wanted to toggle a LED on my board in order to check if the µC works properly.

So the program is loaded onto the device and connection established via XDS110 from a Launchpad with Jumpers removed over 2x5 JTag-Header. CCS indicates everythink worked out fine, but the Pin on my device is not toggled.

Do I have to make further adjustements to the driver or similar in order get the Pin toggled? I use this device "CC2640R2FRHBR" RHB 5x5mm.

Thanks, Alex

  • Hi Alex,

    Have you followed the steps over here: processors.wiki.ti.com/.../CC26xx_HW_Troubleshooting

    After you have verified the above steps, I would try out a TI-Drivers example such as pinInterrupt (removing button code if needed) to see if you can't get the LED blinking. Note, you will need to modify the board file to match your new hardware layout.
  • Hi Sean,

    thank you for your answer.
    I followed the steps from the HW Troubleshooting document. All Voltages are measured as required, the CC2640 is recognized with SmartRF Flash Programmer 2 and a connection can be established.

    I followed your advice using the pin_interrupt example and reduced it to just the initiation, so that the Pin on my LED is initialised as high and then it goes into a loop.
    In CCS the programm seems to be succesfully uploaded, but the LED doesn't light up.

    I was reading about creating a custom board file, but as far as I understand in this file only the maximum number of pins available are actually adjusted. If I follow "Board_PIN_LED0" it should be DIO_6, which is by coincidence the right pin on my board too, so I assume it should work.

    Is there anything else I need to consider concerning the board files?
    Thanks a lot, Alex

  • Hi Alex,

    Here are a couple steps to help you debug further (using pininterrupt as reference example):

    1. BoardGpioInitTable() from main_tirtos.c will call Board_initGeneral() which will initialize pins in BoardGpioInitTable. This structure comes from CC2640R2_LAUNCHXL.c. Make sure this structure is correct.

    2. What does the call to PIN_open() return? Does ledPinHandle == NULL?

    3. When you call PIN_setOutputValue() what is the return value?

    When you debug into these functions what happens?
  • Hi Sean, 

    thank you for your answer. I followed your suggestions and then reduced the code to the very necessary. Trying to initialize the pin/LED as HIGH was a good starting point, adding from there. The CC2640 works properly on my board.

    Regards, Alex