Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Background scanning with shared channel

Rank

Total Posts: 1

Joined 2015-06-12

PM

Hello,

I'm trying to write my own version of auto shared channel with NRF51422 DK board using S210 Softdevice. All went well until I opened up another channel for background scanning on the slave device. I got hard-fault exception when trying to open background scanning after the auto channel.

Is there any restriction for using shared channel together with background scanning?

Below is my configuration for both channel:

AUTO SHARED CHANNEL
.channel_number = 0,
.channel_type = 0x20, //CHANNEL_TYPE_SHARED_SLAVE
.ext_assign = 0,
.rf_freq = 66, // 2425 MHZ
.transmission_type = 3,
.device_type = 2,
.device_number = 1,
.channel_period = 8192, //4Hz
.network_number = 0

BACKGROUND SCANNING CHANNEL
.channel_number = 1,
.channel_type = 0x40, //CHANNEL_TYPE_SLAVE_RX_ONLY
.ext_assign = 0x01, //EXT_PARAM_ALWAYS_SEARCH
.rf_freq = 66, //2425 MHz
.transmission_type = 0,
.device_type = 0,
.device_number = 0,
.channel_period = 0,
.network_number = 0

Thank you very much.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

I wouldn't expect these two features to interfere with one another. Which version of the SDK and SoftDevice are you using?

Could you send me the program counter code and link register where the hard fault occurs? It would help to pinpoint the issue.

You can use this code snippet for getting the hard fault values by placing a breakpoint on the while(1) loop.

/**
* @brief Handler for hard faults
*/
void HardFault_Handler(uint32_t ulLinkRegisteruint32_t ulProgramCounter,)
{
   
(void)ulProgramCounter;
   (
void)ulLinkRegister;
 
    while(
1); // loop for debugging


Thanks