Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of bit-band by
main.cpp
00001 /* 00002 * bit-band test 00003 */ 00004 00005 #include "mbed.h" 00006 00007 DigitalOut led1(LED1); 00008 00009 extern "C" void HardFault_Handler() 00010 { 00011 __nop(); 00012 } 00013 00014 int main() 00015 { 00016 volatile int *a1 = (int*)(0x10000000); // SRAM先頭アドレス 00017 *a1 = 0x1; // Memory windowにて0x1 → 0x0になることを確認した 00018 *a1 = 0x0; 00019 00020 volatile int *a2 = (int*)(0x22000000); // SRAM先頭アドレスをbit-band-aliasで指定 00021 *a2 = 0x1; // Memory windowにて0x10000000を見ても0x1になることを確認出来ない 00022 00023 __nop(); // この行を実行するとHardFault_Handler()に飛ぶ 00024 __nop(); 00025 while (1); 00026 }
Generated on Fri Jul 15 2022 22:49:31 by
1.7.2
