Configuring BLE Central Device to work in a particular Scan and Connection Channel - KBA218992

Version: **



How to configure the BLE Central device to function in a particular Scan and Connection channel?



There are APIs CyBle_GapGetChannelMap() and CyBle_GapcSetHostChannelClassification() for configuring Data Channel mapping, but no API is available to configure the Scan Channel mapping. However, Scan Channel mapping can be done by writing to the specific BLE_BLELL_SCAN_CONFIG register. To change the Scan Channel map configuration, change the 13-, 14- and 15-bits of BLE_BLELL_SCAN_CONFIG register.

Table 1. BLE_BLELL_SCAN_CONFIG Register Bit Mapping 

15:13SCAN_CHANNEL_MAPAdvertising channels that are enabled for scanning operation.
    Bit 15: setting 1 - enables channel 39 for use.
    Bit 14: setting 1 - enables channel 38 for use.
    Bit 13: setting 1 - enables channel 37 for use.
    Default Value: 7 (All are ‘1’)

For more details on BLE_BLELL_SCAN_CONFIG register, refer to the CYBL10X6X Family: Programmable Radio-on-Chip With BLE (PRoC® BLE) Registers Technical Reference Manual (TRM) (Page 167). 


Scan the 37th channel and use the below code in CYBLE_EVT_STACK_ON before CyBle_GapcStartScan() API: