1 Reply Latest reply on Feb 20, 2018 4:21 AM by GyanC_36

    BLE RF Tests


        Hi All,

      We are starting a manufacturing of a small PSoC4 based  BLE thermometer in China. We're going through CE/FCC certification. The chinese  lab that will do the test require a "Fixed frequency test  and they want an output similar to this




      Somebody provided this sample code:


      #ifdef RFTEST

      void TxCW(void){

          uint32 cfg2,cfgctrl,sy;


          //// set CW mode, To prevent first time TX  frequency offset before CW mode enabled in case.

         CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_MODEM), 0x96EC);       


         // Configure DSM as first order PLL

         CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_CFGCTRL),0x0008);


         // Enable Transmit at the required TX frequency

         CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_CFG1), 0xBB48);

         //CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_DBUS), 0xE962);   // 0x962=2402 is channel frequency in MHz

         //CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_DBUS), 0xE992);   // 0x992=2450 is channel frequency in MHz

         CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_DBUS), 0xE9B0);   // 0x9B0=2480 is channel frequency in MHz



          // Synchronisation delay for PA to ramp



          // Disable modulation port

          cfg2= CY_GET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_CFG2));

          cfg2 |=0x1000;   

          cfg2 &=~0x03FF;                    

          cfg2 |=0x0200;   


          // Enable test mode

          cfgctrl= CY_GET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_CFGCTRL));

          cfgctrl |=0x8000;


          // Close the loop

          sy= CY_GET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_SY));

          sy |=0x4000;     


          CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_CFG2), cfg2);  

          CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_CFGCTRL), cfgctrl);

          CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_SY),sy);  




      And calling this after the BLE stack signals it is initialized seems to work to some extend but the output is "just a carrier frequency".  Juggling with  BLERD_CFG2 I've managed to get some different signals but not the one they want .. The folks here in Europe said we need to "output" pseudo random data or "PN9" so we get close to the picture the Chinese lab want to see. Now do I have to constantly modify BLERD_CFG2 to make it output this pseudo random data or is there a more "standard" way to achieve what the lab wants?  What about CyBle_StartTransmitterTest is there more detailed documentation than the one in the datasheet?