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.

Transfer of data from CC2430 to PC

Other Parts Discussed in Thread: CC2430

We are newbies.We are using the "pertest" project from the examples given. We are able to transmit our data from one Smart RF04(mounted with CC2430EM) to the other.

Now we want to tranmit the data to a file stored in Computer using serial port.Please help us to get started.

 

 

  • Hi Abc,

    Please have a look at the following desing note on how to use the Usart:

    DN112 -- Using UART in CC111xFx CC243x and CC251xFx (Rev. A)
    <!-- var tiPageName = "App Note Abstract : DN112 -- Using UART in CC111xFx CC243x and CC251xFx (Rev. A)"; //--> This design note describes the key elements and simple usage of the CC111xFx/CC243x/CC251xFx USART peripheral interface in UART mode. API commands and settings required to operate the UART with and without DMA support are explained.

    http://focus.ti.com/lit/an/swra222a/swra222a.pdf

    It should contain everything needed to transmit from the CC2430 to the PC using the serial port.

  • thanks for the reply.I have read the whole  document and added the code in my "per_test" example problem as below:

    But no output is observed at the serial port.

    / Define size of allocated UART RX/TX buffer (just an example)
    #define SIZE_OF_UART_RX_BUFFER 5
    #define SIZE_OF_UART_TX_BUFFER SIZE_OF_UART_RX_BUFFER
    // Allocate buffer+index for UART RX/TX
    unsigned short __xdata uartRxBuffer[SIZE_OF_UART_RX_BUFFER];
    unsigned short __xdata uartTxBuffer[SIZE_OF_UART_TX_BUFFER];
    unsigned short __xdata uartRxIndex, uartTxIndex;

    //Define baudrate parameters
    unsigned char uartBaudM = 216;
    unsigned char uartBaudE = 10;
    unsigned char uartNumb = 0;
    unsigned char uartPortAlt =1;
    unsigned char uartDmaTxChan=0;//Channel 0

    void main (void)
    {
        uint8 appMode;

        appState = IDLE;
        appStarted = FALSE;
     
        // Config basicRF
        basicRfConfig.panId = PAN_ID;
        basicRfConfig.ackRequest = FALSE;

        // Initialise board peripherals
        halBoardInit();
        //HalUARTInit();
       
        // Initalise hal_rf
        if(halRfInit()==FAILED) {
          HAL_ASSERT(FALSE);
        }

        // Indicate that device is powered
        halLedSet(1);

        // Print Logo and splash screen on LCD
        utilPrintLogo("PER Tester");

        // Wait for user to press S1 to enter menu
        while (!HAL_BUTTON_1_PUSHED());
        halMcuWaitMs(350);
        halLcdClear();

        // Set channel
        basicRfConfig.channel = appSelectChannel();
       
        //UART initialization-----Added new
        uartProtConfig.uartNum=0x00;
        uartProtConfig.START=0x00;
        uartProtConfig.STOP=0x01;
        uartProtConfig.SPB=0x00;
        uartProtConfig.PARITY=0x00;//PARITY DISABLED
        uartProtConfig.BIT9=0x00;
        uartProtConfig.D9=0x01;//as that of STOP bit
        uartProtConfig.FLOW=0x01;//flow control enabled
        uartProtConfig.ORDER=0x00;//LSB first
       
        uartMapPort(uartPortAlt,uartNumb);  //Mapping UART to SoC i/o
        uartInitBitrate(uartBaudM,uartBaudE); //Initializing the UART Baud Rate Generator----57600BPS
        uartInitProtocol(&uartProtConfig); //Initializing the UART Protocol
        uartStartTxDmaChan(uartNumb,&uartDmaTxCh,uartDmaTxChan,rxPacket.padding,SIZE_OF_UART_TX_BUFFER);
       
        // Set mode
        appMode = appSelectMode();

        // Transmitter application
        if(appMode == MODE_TX) {
            // No return from here
            appTransmitter();
        }
        // Receiver application
        else if(appMode == MODE_RX) {
            // No return from here
            appReceiver();
        }
        // Role is undefined. This code should not be reached
        HAL_ASSERT(FALSE);
    }