BLE FOTA APP

Dependencies:   BLE_API mbed

It doesn't work with the default FOTA bootloader. It use NVIC_SystemReset() to enter a bootloader.

Committer:
yihui
Date:
Fri Oct 10 03:36:28 2014 +0000
Revision:
1:a607cd9655d7
use NVIC_SystemReset() to run bootloader

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yihui 1:a607cd9655d7 1 /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
yihui 1:a607cd9655d7 2 *
yihui 1:a607cd9655d7 3 * The information contained herein is property of Nordic Semiconductor ASA.
yihui 1:a607cd9655d7 4 * Terms and conditions of usage are described in detail in NORDIC
yihui 1:a607cd9655d7 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
yihui 1:a607cd9655d7 6 *
yihui 1:a607cd9655d7 7 * Licensees are granted free, non-transferable use of the information. NO
yihui 1:a607cd9655d7 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
yihui 1:a607cd9655d7 9 * the file.
yihui 1:a607cd9655d7 10 *
yihui 1:a607cd9655d7 11 */
yihui 1:a607cd9655d7 12
yihui 1:a607cd9655d7 13 /** @file
yihui 1:a607cd9655d7 14 *
yihui 1:a607cd9655d7 15 * @defgroup ble_debug_assert_handler Assert Handler for debug purposes.
yihui 1:a607cd9655d7 16 * @{
yihui 1:a607cd9655d7 17 * @ingroup ble_sdk_lib
yihui 1:a607cd9655d7 18 * @brief Module for handling of assert during application development when debugging.
yihui 1:a607cd9655d7 19 *
yihui 1:a607cd9655d7 20 * @details This module may be used during development of an application to facilitate debugging.
yihui 1:a607cd9655d7 21 * It contains a function to write file name, line number and the Stack Memory to flash.
yihui 1:a607cd9655d7 22 * This module is ONLY for debugging purposes and must never be used in final product.
yihui 1:a607cd9655d7 23 *
yihui 1:a607cd9655d7 24 */
yihui 1:a607cd9655d7 25
yihui 1:a607cd9655d7 26 #ifndef BLE_DEBUG_ASSERT_HANDLER_H__
yihui 1:a607cd9655d7 27 #define BLE_DEBUG_ASSERT_HANDLER_H__
yihui 1:a607cd9655d7 28
yihui 1:a607cd9655d7 29 #include <stdint.h>
yihui 1:a607cd9655d7 30
yihui 1:a607cd9655d7 31 /**@brief Function for handling the Debug assert, which can be called from an error handler.
yihui 1:a607cd9655d7 32 * To be used only for debugging purposes.
yihui 1:a607cd9655d7 33 *
yihui 1:a607cd9655d7 34 *@details This code will copy the filename and line number into local variables for them to always
yihui 1:a607cd9655d7 35 * be accessible in Keil debugger. The function will also write the ARM Cortex-M0 stack
yihui 1:a607cd9655d7 36 * memory into flash where it can be retrieved and manually un-winded in order to
yihui 1:a607cd9655d7 37 * back-trace the location where the error ocured.<br>
yihui 1:a607cd9655d7 38 * @warning <b>ALL INTERRUPTS WILL BE DISABLED.</b>
yihui 1:a607cd9655d7 39 *
yihui 1:a607cd9655d7 40 * @note This function will never return but loop forever for debug purposes.
yihui 1:a607cd9655d7 41 *
yihui 1:a607cd9655d7 42 * @param[in] error_code Error code supplied to the handler.
yihui 1:a607cd9655d7 43 * @param[in] line_num Line number where the original handler is called.
yihui 1:a607cd9655d7 44 * @param[in] p_file_name Pointer to the file name.
yihui 1:a607cd9655d7 45 */
yihui 1:a607cd9655d7 46 void ble_debug_assert_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name);
yihui 1:a607cd9655d7 47
yihui 1:a607cd9655d7 48 #endif /* BLE_DEBUG_ASSERT_HANDLER_H__ */