Skip to content

Commit ebbed82

Browse files
committed
more clean up
1 parent a800c20 commit ebbed82

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

libraries/Bluefruit52Lib/src/bluefruit.cpp

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,26 @@ static void nrf_error_cb(uint32_t id, uint32_t pc, uint32_t info)
7676
PRINT_INT(id);
7777
PRINT_HEX(pc);
7878
PRINT_HEX(info);
79+
80+
if ( id == NRF_FAULT_ID_SD_ASSERT && info != 0)
81+
{
82+
typedef struct
83+
{
84+
uint16_t line_num; /**< The line number where the error occurred. */
85+
uint8_t const * p_file_name; /**< The file in which the error occurred. */
86+
} assert_info_t;
87+
88+
assert_info_t* assert_info = (assert_info_t*) info;
89+
90+
LOG_LV1("SD Err", "assert at %s : %d", assert_info->p_file_name, assert_info->line_num);
91+
}
92+
93+
#if CFG_DEBUG
94+
while(1)
95+
{
96+
97+
}
98+
#endif
7999
}
80100

81101
/**
@@ -427,7 +447,8 @@ err_t AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count)
427447
TaskHandle_t soc_task_hdl;
428448
xTaskCreate( adafruit_soc_task, "SOC", CFG_SOC_TASK_STACKSIZE, NULL, TASK_PRIO_HIGH, &soc_task_hdl);
429449

430-
NVIC_SetPriority(SD_EVT_IRQn, 6);
450+
// Interrupt priority has already been set by the stack.
451+
// NVIC_SetPriority(SD_EVT_IRQn, 6);
431452
NVIC_EnableIRQ(SD_EVT_IRQn);
432453

433454
// Create Timer for led advertising blinky

0 commit comments

Comments
 (0)