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.

UART not working whrn cc debugger is removed in CC2541

Other Parts Discussed in Thread: CC2541

Hi,

 I am using CC 2541. I want to send temperature data sensed by cc 2541 sensor tag on UART pins.I got uart sample code in  "CC2541_43_44_45_Peripherals_Software_Examples"  zip file which I downloaded from this page  http://e2e.ti.com/support/wireless_connectivity/f/155/t/278173.aspx.

I tried uart_poll.c after modifying it.I modified it so that I can use P1_4(port 1-pin4),P1_5 for Rx and Tx.I have done this  because I took UART output from P1 connector provided on the backside of battery slot on sensor tag(kindly refer schematics for P1 connector pin details).

Now the problem is that I am getting output data on uart tx pin provided if I connect cc debugger to sensor tag.If I remove it ,data from sensor tag stops which I am observing on GTK Term terminaal on linux machine.

Why should I connect CC debugger to get data from CC 2541?

  • Can you let us know of your Pin selector & register settings? Namely, PERCFG, P0SEL, PortPRI, etc? Also Is flow Control enabled or disabled?

    Regards,

    Arun

  • Hi Arun,

    Firstly thanks a lot for replying.

    I am using connector P1 provided on the back side of sensor tag battery slot.

    Kindly refer the schematics of sensor tag in http://www.ti.com/lit/df/swrr126/swrr126.pdf.

    In this doc u can find P1 connector having Rx and Tx pins connected to P1_4(port1 pin 4) and P1_5.

    So I configured UART0 in alt 2.My register values are as follows:

    PERCFG=0x01;

    P1SEL |=0x3c -here  P1SEL has 0xF4 which is ORed with 0x3c;(so after doing this P1_4 and P1_5 is configured for peripheral function)

    P2SEL=0x00;

    U0CSR=0x86;

    hardware flow control disabled in U0UCR;

    It seems all these values are correct and I am getting output from UART Tx pin.But the problem is why I am getting output only when CC Debugger is connected.If I remove debugger immediately UART output stops.

    I read in this forum only that one guy had similar problem and someone replied that it might be due to ground issues.

    I am clueless regarding this issue.

    Thanks.

  • Hi,

    You have to use P1SEL as 0x30 as Rx and Tx lines are on P1_4 P1_5.Even U0CSR has to 0x80.

    Since FLow control is disabled, please ground the CTS pin too.

    Regards,

    Arun 

  • Hi Arun ,

    Same sensortag I am using for UART , Normally I got output ( No problem with Receiving and Transmitting) but when it comes to Hardware flow control enabled I am not seeing any data on Serial Terminal ( Putty ).

    Below are my port configurations

    PERCFG = 0x01;
    P1SEL = 0x3C;
    P1 = 0x3C;
    P1DIR = 0x3C; 
    P2SEL = 0x20;

    Baud rate = 9600

  • Continuing for Previous post ........

    I connected sensortag RTS pin(P1_3) -> Serial cable CTS
    sensortag CTS pin (P1_4) -> Serial cable RTS