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?
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?
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 ?
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);*/
}
.
I enable it
How & where, exactly ?
can't complie
Why not?
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_gsg_ses%2FUG%2Fgsg%2Fdebug.html
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_gsg_ses%2FUG%2Fgsg%2Fdebug.html
sorry,I use IAR,how to debug?
IAR's debug capabilities will work just the same on nRF as on any other Cortex-M4.
RTT is Segger-specific, but not dependent on the IDE.
infocenter.nordicsemi.com/.../communicate.html
Nordic provide some tutorials for SES & Keil:
https://infocenter.nordicsemi.com/topic/ug_gsg_ses/UG/gsg/debug.html
https://infocenter.nordicsemi.com/topic/ug_gsg_keil/UG/gsg/debug.html
All IDEs have basically the same capabilities - so you can work out how to apply them for IAR.
With a SoftDevice enabled, you are likely to need Monitor-Mode Debug - this is also Segger-specific, but transparent to the IDE:
devzone.nordicsemi.com/.../193088
https://devzone.nordicsemi.com/f/nordic-q-a/38666/monitor-mode-debugging/149581#149581