This is a monitor program for BLE NRF51822 chip. You can check memory, register and system information.
Dependencies: BLE_API mbed nRF51822 nRF51_Vdd
Please refer follows.
/users/kenjiArai/code/debug_tools/
/users/kenjiArai/notebook/ble--tytaiyo-yuden-module-for-mbed/
Diff: debug_tools/debug_nRF51.cpp
- Revision:
- 5:8c37a47ac34c
- Parent:
- 4:36ad7c7d0400
--- a/debug_tools/debug_nRF51.cpp Sun Feb 14 21:55:30 2016 +0000 +++ b/debug_tools/debug_nRF51.cpp Sun Jan 08 04:36:55 2017 +0000 @@ -1,11 +1,11 @@ /* * mbed Application program * - * Copyright (c) 2016 Kenji Arai / JH1PJL + * Copyright (c) 2016,'17 Kenji Arai / JH1PJL * http://www.page.sannet.ne.jp/kenjia/index.html * http://mbed.org/users/kenjiArai/ * Created: Feburary 1st, 2016 - * Revised: Feburary 11th, 2016 + * Revised: January 8th, 2017 * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE @@ -21,6 +21,7 @@ #include "debug_common.h" #include "nrf_soc.h" // for internal Thermo sensoer #include "nRF51_Vdd.h" // Read nRF51 Vdd voltage +#include "nrf_delay.h" // Object ---------------------------------------------------------------------------------------- nRF51_Vdd vdd_mon(3.6f, 2.6f); @@ -47,12 +48,16 @@ { PRINTF(mon_msg); put_rn(); + PRINTF(" RESET -> Press [Alt]+B"); + put_rn(); PRINTF("c - CPU VDD & Temp info"); put_rn(); PRINTF("l - Low current (Sleep Mode)"); put_rn(); +#if 0 PRINTF("t - Test Radio module"); put_rn(); +#endif PRINTF("s - CPU system info"); put_rn(); PRINTF("r - Reset(by Software)"); @@ -129,12 +134,16 @@ PRINTF("Vdd: %4.3fV", vdd_mon.read_real_value()); put_rn(); break; +#if 0 // Nobember 1st, 2016 + // Timer1 IRQ handaler dupulicated error is occured dur to revision change. + // I cannot control Radio module. //--------------------------------------------------------------------------------- // Test Radio module //--------------------------------------------------------------------------------- case 't' : trx_control(); break; +#endif //--------------------------------------------------------------------------------- // Something new and try new functions //--------------------------------------------------------------------------------- @@ -146,7 +155,8 @@ // Go to Low current (Sleep mode) //--------------------------------------------------------------------------------- case 'l' : - PRINTF("Enter Sleep mode (Please push RESET button)"); + PRINTF("Enter Sleep mode (Please push RESET button on the board"); + PRINTF(" or Press [Alt]+B from PC)"); put_rn(); while(true){ sleep(); @@ -201,3 +211,5 @@ } #endif // defined(TARGET_NRF51822) + +