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.

CCS/LAUNCHXL-CC1352R1: PIN_open function always return NULL

Part Number: LAUNCHXL-CC1352R1

Tool/software: Code Composer Studio

 PIN_Handle csPinHandle;
     PIN_State spiPinsState;
     PIN_Config *spiPins;

   

     /*PIN_Config spiPins[] =
     {      PIN_ID()
          CC1352R1_LAUNCHXL_SPI0_MOSI | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH   | PIN_PUSHPULL,
          CC1352R1_LAUNCHXL_SPI0_CLK | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH   | PIN_PUSHPULL,
          CC1352R1_LAUNCHXL_SPI0_MISO | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH   | PIN_PUSHPULL,
          //CC1352R1_LAUNCHXL_SPI0_CSN | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH   | PIN_PUSHPULL ,
          PIN_TERMINATE
     };*/

     csPinHandle = PIN_open(&spiPinsState,spiPins);
     if (csPinHandle == NULL) {
                while (1);  // PIN_open() failed
            }

     PIN_Id csnPin1  = PIN_ID(CC1352R1_LAUNCHXL_SPI0_CSN);
     SPI_control(spi,SPICC26X2DMA_CMD_SET_CSN_PIN, &csnPin1);


    //PIN_setOutputValue(csPinHandle, IOID_11,1);
     //transmitBuffer[0]=0x60;
      spiTransaction.count = MSGSIZE;
      spiTransaction.txBuf = transmitBuffer;
      spiTransaction.rxBuf = receiveBuffer;

     transferOK = SPI_transfer(spi, &spiTransaction);

      if (!transferOK) {
       // Error in SPI or transfer already in progress.
           while (1);
       }

      //PIN_setOutputValue(csPinHandle, IOID_11,0);
      transmitBuffer[0]=0x50;
      transmitBuffer[1]=0x00;
      spiTransaction.txBuf = transmitBuffer;
      usleep(100000);
      spiTransaction.rxBuf = receiveBuffer;

      transferOK = SPI_transfer(spi, &spiTransaction);

      //PIN_setOutputValue(csPinHandle, IOID_11,1);
        SPI_transferCancel(spi);
    return (NULL);

maybe pins were not allocatable ..ti sample code comment said .

what's the problem ?