本帖最后由 cuiyul 于 2015-12-18 09:39 编辑
- void flexint (void)
- {
- SCB->SHCSR|=SCB_SHCSR_BUSFAULTENA_Msk|SCB_SHCSR_MEMFAULTENA_Msk|SCB_SHCSR_USGFAULTENA_Msk;
- if ( partition_flash( EEPROM_1K_1K, 0X03))
- {
- /* Device has been partitioned for the first time, so this
- * means the counters have not been initialized yet. We'll
- * zero them out now.
- */
- *((uint32_t *)(LONGWORD_COUNTER_ADDR)) = 0x1;
- while(!(FTFL->FCNFG & FTFL_FCNFG_EEERDY_MASK));
- }
- else
- {
- printf("\nlongword counter = 0x%08X", *(uint32_t *)(LONGWORD_COUNTER_ADDR));
-
- }
-
- }
|