This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

system auto reset

I use sdk13.0,s332,when my system working,it will  auto reset about 129 seconds per time,I make a breakpoint,find it caused by "softdevice_fault_handler",when it reset,the parameter:

id=1,pc=18640,info=0,,waht's the priblem?

Parents
  • So your code is crashing and it's going to the Hard Fault handler.

    Do you have a 'Debug' configuration that gives log output to help you find the problem?

    Think about what might be happening at 130 seconds - eg, an Advertising timeout, etc ?

  • how to print the debug infor ?I enable it , can't complie.

    I don't add bt code,now it only run Ant scan,when I delete the function" continuous_scan_init() "at Initialize,it can run ok,but use it ,the system will reset 129s per time.pls see the function

    static void continuous_scan_init()
    {
    uint32_t err_code;
    static uint8_t network_key[] = {0xB9, 0xA5, 0x21, 0xFB, 0xBD, 0x72, 0xC3, 0x45};
    // Set library config to report RSSI and Device ID
    err_code = sd_ant_lib_config_set(
    ANT_LIB_CONFIG_MESG_OUT_INC_RSSI | ANT_LIB_CONFIG_MESG_OUT_INC_DEVICE_ID);
    APP_ERROR_CHECK(err_code);

    // Configure channel 0 for scanning mode, but do not open it.
    // The scanning channel will be opened in scan mode for a short amount of time on a button press.
    ant_channel_config_t channel_config =
    {
    .channel_number = ANT_SCAN_CHANNEL_NUMBER,
    .channel_type = CHANNEL_TYPE_SLAVE,
    .ext_assign = 0x00,
    .rf_freq = RF_FREQ,  //57
    .transmission_type = CHAN_ID_TRANS_TYPE,     // 0
    .device_type = CHAN_ID_DEV_TYPE,                   //120
    .device_number = 0x00, // Wildcard
    .channel_period = 0x00, // Not used, since this is going to be scanning
    .network_number = ANT_NETWORK_NUMBER,
    };

    err_code = ant_channel_init(&channel_config);
    APP_ERROR_CHECK(err_code);

    err_code =sd_ant_network_address_set(ANT_SCAN_CHANNEL_NUMBER, network_key);
    APP_ERROR_CHECK(err_code);


    err_code = sd_ant_rx_scan_mode_start(ANT_SCAN_CHANNEL_NUMBER);
    APP_ERROR_CHECK(err_code);
    // Assign a second channel for sending messages on the reverse direction
    // There is no need to configure any other parameters, this channel is never opened;
    // its resources are used by ANT to send messages in the reverse direction while in
    // continuous scanning mode.
    /* err_code = sd_ant_channel_assign(ANT_RESPONSE_CHANNEL_NUMBER,
    CHANNEL_TYPE_SLAVE,
    ANT_NETWORK_NUMBER,
    0x00);
    APP_ERROR_CHECK(err_code);*/
    }

Reply Children
Related