![](/media/cache/profiles/312e53ccba0b2ddfefd4a1f05b55bcdd.jpg.50x50_q85.jpg)
BLE FOTA APP
It doesn't work with the default FOTA bootloader. It use NVIC_SystemReset() to enter a bootloader.
nRF51822/nordic/nrf-sdk/system_nrf51.h@1:a607cd9655d7, 2014-10-10 (annotated)
- 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?
User | Revision | Line number | New contents of line |
---|---|---|---|
yihui | 1:a607cd9655d7 | 1 | /* Copyright (c) 2013, Nordic Semiconductor ASA |
yihui | 1:a607cd9655d7 | 2 | * All rights reserved. |
yihui | 1:a607cd9655d7 | 3 | * |
yihui | 1:a607cd9655d7 | 4 | * Redistribution and use in source and binary forms, with or without |
yihui | 1:a607cd9655d7 | 5 | * modification, are permitted provided that the following conditions are met: |
yihui | 1:a607cd9655d7 | 6 | * |
yihui | 1:a607cd9655d7 | 7 | * * Redistributions of source code must retain the above copyright notice, this |
yihui | 1:a607cd9655d7 | 8 | * list of conditions and the following disclaimer. |
yihui | 1:a607cd9655d7 | 9 | * |
yihui | 1:a607cd9655d7 | 10 | * * Redistributions in binary form must reproduce the above copyright notice, |
yihui | 1:a607cd9655d7 | 11 | * this list of conditions and the following disclaimer in the documentation |
yihui | 1:a607cd9655d7 | 12 | * and/or other materials provided with the distribution. |
yihui | 1:a607cd9655d7 | 13 | * |
yihui | 1:a607cd9655d7 | 14 | * * Neither the name of Nordic Semiconductor ASA nor the names of its |
yihui | 1:a607cd9655d7 | 15 | * contributors may be used to endorse or promote products derived from |
yihui | 1:a607cd9655d7 | 16 | * this software without specific prior written permission. |
yihui | 1:a607cd9655d7 | 17 | * |
yihui | 1:a607cd9655d7 | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
yihui | 1:a607cd9655d7 | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
yihui | 1:a607cd9655d7 | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
yihui | 1:a607cd9655d7 | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
yihui | 1:a607cd9655d7 | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
yihui | 1:a607cd9655d7 | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
yihui | 1:a607cd9655d7 | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
yihui | 1:a607cd9655d7 | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
yihui | 1:a607cd9655d7 | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
yihui | 1:a607cd9655d7 | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
yihui | 1:a607cd9655d7 | 28 | * |
yihui | 1:a607cd9655d7 | 29 | */ |
yihui | 1:a607cd9655d7 | 30 | #ifndef SYSTEM_NRF51_H |
yihui | 1:a607cd9655d7 | 31 | #define SYSTEM_NRF51_H |
yihui | 1:a607cd9655d7 | 32 | |
yihui | 1:a607cd9655d7 | 33 | #ifdef __cplusplus |
yihui | 1:a607cd9655d7 | 34 | extern "C" { |
yihui | 1:a607cd9655d7 | 35 | #endif |
yihui | 1:a607cd9655d7 | 36 | |
yihui | 1:a607cd9655d7 | 37 | #include <stdint.h> |
yihui | 1:a607cd9655d7 | 38 | |
yihui | 1:a607cd9655d7 | 39 | |
yihui | 1:a607cd9655d7 | 40 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ |
yihui | 1:a607cd9655d7 | 41 | |
yihui | 1:a607cd9655d7 | 42 | /** |
yihui | 1:a607cd9655d7 | 43 | * Initialize the system |
yihui | 1:a607cd9655d7 | 44 | * |
yihui | 1:a607cd9655d7 | 45 | * @param none |
yihui | 1:a607cd9655d7 | 46 | * @return none |
yihui | 1:a607cd9655d7 | 47 | * |
yihui | 1:a607cd9655d7 | 48 | * @brief Setup the microcontroller system. |
yihui | 1:a607cd9655d7 | 49 | * Initialize the System and update the SystemCoreClock variable. |
yihui | 1:a607cd9655d7 | 50 | */ |
yihui | 1:a607cd9655d7 | 51 | extern void SystemInit (void); |
yihui | 1:a607cd9655d7 | 52 | |
yihui | 1:a607cd9655d7 | 53 | /** |
yihui | 1:a607cd9655d7 | 54 | * Update SystemCoreClock variable |
yihui | 1:a607cd9655d7 | 55 | * |
yihui | 1:a607cd9655d7 | 56 | * @param none |
yihui | 1:a607cd9655d7 | 57 | * @return none |
yihui | 1:a607cd9655d7 | 58 | * |
yihui | 1:a607cd9655d7 | 59 | * @brief Updates the SystemCoreClock with current core Clock |
yihui | 1:a607cd9655d7 | 60 | * retrieved from cpu registers. |
yihui | 1:a607cd9655d7 | 61 | */ |
yihui | 1:a607cd9655d7 | 62 | extern void SystemCoreClockUpdate (void); |
yihui | 1:a607cd9655d7 | 63 | |
yihui | 1:a607cd9655d7 | 64 | #ifdef __cplusplus |
yihui | 1:a607cd9655d7 | 65 | } |
yihui | 1:a607cd9655d7 | 66 | #endif |
yihui | 1:a607cd9655d7 | 67 | |
yihui | 1:a607cd9655d7 | 68 | #endif /* SYSTEM_NRF51_H */ |