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.

Queries regarding CC2450 Pairing Issues

Other Parts Discussed in Thread: CC2540

We are working on a custom board with a CC2540 SOC, and trying to pair the Board with the TI 's CC2540 USB dongleboard using BTool. Unfortunately we are not able to Discover our Board. We have some queries regarding the same to be checked with the TI.

History:  We are successfully able to discover, pair and communicate with our Keyfob and  USB dongle module with the executable "CC2540_keyfob_SimpleBLEPeripheral.hex"  and  "CC2540_USBdongle_HostTestRelease_All.hex" . In this application the keyfob will be in non-discover mod as default, we have to use the keys(switch) to make the keyfob in discover mode.

We programmed our new board "CC2540_keyfob_SimpleBLEPeripheral.hex"  file , since we need discover mode as the default state, we copied the following line into the main function in the file "SimpleBLEPeripheral_Main.c" of the  application "SimpleBLEPeripheral".

 // Final board initialization
  InitBoard( OB_READY );
  #if defined ( POWER_SAVING )
    osal_pwrmgr_device( PWRMGR_BATTERY );
  #endif
  
/* Added Lines */
  
      uint8 current_adv_enabled_status;
      uint8 new_adv_enabled_status;
      
      //Find the current GAP advertisement status
      GAPRole_GetParameter( GAPROLE_ADVERT_ENABLED, &current_adv_enabled_status );
      
      if( current_adv_enabled_status == FALSE )
      {
        new_adv_enabled_status = TRUE;
      }
      else
      {
        new_adv_enabled_status = FALSE;
      }
      
      //change the GAP advertisement status to opposite of current status
      GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), &new_adv_enabled_status ); 
      
/* Added Lines */


/* Start OSAL */
  osal_start_system(); // No Return from here
we would like to know that whatever we have done is correct? or is there any alternate approach to do the pairing of our custom board with CC2540 USB Dongle?
  • Hi Timothy,

    If you have copied the CC2540 USB reference design you might have missed that you need to add a 32kHz crystal to enable low power mode (i.e. POWER_SAVING). If you do not have the sleep crystal, you cannot put the device in sleep and therefore you have to remove POWER_SAVING from the project defines in order for the application to work properly.

    You can compare the reference designs:

    CC2540EM Reference design

    CC2540USB Reference design 

    Best Regards

  • I don't think you need to add those many lines in SimpleBLEPeripheral_Main.c file.

    Just make change from uint8 initial_advertising_enable = FALSE; to TRUE; in  void SimpleBLEPeripheral_Init( uint8 task_id ) function in SimpleBLEPeripheral.c file. This should make hardware advertise itself and becomes discoverable.

    Hope that it helps.

    Regards,

    maharjanbk