Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c
- index 405b710..954369e 100644
- --- a/firmware/target/arm/as3525/debug-as3525.c
- +++ b/firmware/target/arm/as3525/debug-as3525.c
- @@ -347,6 +347,7 @@ bool __dbg_ports(void)
- lcd_clear_display();
- lcd_setfont(FONT_SYSFIXED);
- +#if 0
- while(1)
- {
- line = 0;
- @@ -367,6 +368,46 @@ bool __dbg_ports(void)
- if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
- break;
- }
- +#else
- + static int i_test[512] IBSS_ATTR;
- + static int d_test[512];
- + int x,y;
- + int ir_start,ir_stop,iw_start,iw_stop;
- + int dr_start,dr_stop,dw_start,dw_stop;
- +
- +#define max (1<<25)
- +
- + iw_start = current_tick;
- + for(x = 0; x < max ; x++)
- + i_test[x%512] = x;
- + iw_stop = current_tick;
- +
- + dw_start = current_tick;
- + for(x = 0; x < max ; x++)
- + d_test[x%512] = x;
- + dw_stop = current_tick;
- +
- + ir_start = current_tick;
- + for(x = 0; x < max ; x++)
- + y = i_test[x%512];
- + ir_stop = current_tick;
- +
- + dr_start = current_tick;
- + for(x = 0; x < max ; x++)
- + y = d_test[x%512];
- + dr_stop = current_tick;
- +
- + line = 0;
- + _DEBUG_PRINTF("IRAM R %d ticks", ir_stop - ir_start);
- + _DEBUG_PRINTF("IRAM W %d ticks", iw_stop - iw_start);
- + _DEBUG_PRINTF("DRAM R %d ticks", dr_stop - dr_start);
- + _DEBUG_PRINTF("DRAM W %d ticks", dw_stop - dw_start);
- + lcd_update();
- +
- +
- + while(button_get_w_tmo(HZ/10) != (DEBUG_CANCEL|BUTTON_REL)) ;
- +
- +#endif
- lcd_setfont(FONT_UI);
- return false;
- }
Add Comment
Please, Sign In to add comment