Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
disable app timer interrupt for bfin serial load
- Loading branch information
Showing
with
12 additions
and
0 deletions.
-
+2
−0
apps/bees/src/ser.c
-
+8
−0
avr32_lib/src/timers.c
-
+2
−0
avr32_lib/src/timers.h
|
|
@@ -310,6 +310,7 @@ int serial_bfinDscBuf_idx; |
|
|
#define MAX_SERIAL_DSC_SIZE (256 * 1024) |
|
|
|
|
|
void serial_bfinProgStart() { |
|
|
pause_timers(); |
|
|
if(serial_bfinHexBuf == NULL) |
|
|
serial_bfinHexBuf = alloc_mem(MAX_SERIAL_HEX_SIZE); |
|
|
serial_bfinHexBuf_idx = 0; |
|
|
@@ -362,6 +363,7 @@ void serial_bfinProgEnd() { |
|
|
bfin_enable(); |
|
|
app_resume(); |
|
|
|
|
|
start_timers(); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@@ -77,6 +77,14 @@ u8 timer_add( softTimer_t* t, u32 ticks, timer_callback_t callback, void* obj) { |
|
|
return ret; |
|
|
} |
|
|
|
|
|
void pause_timers (void) { |
|
|
cpu_irq_disable_level(APP_TC_IRQ_PRIORITY); |
|
|
} |
|
|
|
|
|
void start_timers (void) { |
|
|
cpu_irq_enable_level(APP_TC_IRQ_PRIORITY); |
|
|
} |
|
|
|
|
|
// remove a timer from the list |
|
|
// return 1 if removed, 0 if not found |
|
|
u8 timer_remove( softTimer_t* t) { |
|
|
|
|
|
@@ -47,5 +47,7 @@ void process_timers( void ); |
|
|
|
|
|
// clear the list |
|
|
extern void timers_clear(void) ; |
|
|
void start_timers (void); |
|
|
void pause_timers (void); |
|
|
|
|
|
#endif // header guard |