Guest User

Untitled

a guest
Jun 21st, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c
  2. index 405b710..954369e 100644
  3. --- a/firmware/target/arm/as3525/debug-as3525.c
  4. +++ b/firmware/target/arm/as3525/debug-as3525.c
  5. @@ -347,6 +347,7 @@ bool __dbg_ports(void)
  6. lcd_clear_display();
  7. lcd_setfont(FONT_SYSFIXED);
  8.  
  9. +#if 0
  10. while(1)
  11. {
  12. line = 0;
  13. @@ -367,6 +368,46 @@ bool __dbg_ports(void)
  14. if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
  15. break;
  16. }
  17. +#else
  18. + static int i_test[512] IBSS_ATTR;
  19. + static int d_test[512];
  20. + int x,y;
  21. + int ir_start,ir_stop,iw_start,iw_stop;
  22. + int dr_start,dr_stop,dw_start,dw_stop;
  23. +
  24. +#define max (1<<25)
  25. +
  26. + iw_start = current_tick;
  27. + for(x = 0; x < max ; x++)
  28. + i_test[x%512] = x;
  29. + iw_stop = current_tick;
  30. +
  31. + dw_start = current_tick;
  32. + for(x = 0; x < max ; x++)
  33. + d_test[x%512] = x;
  34. + dw_stop = current_tick;
  35. +
  36. + ir_start = current_tick;
  37. + for(x = 0; x < max ; x++)
  38. + y = i_test[x%512];
  39. + ir_stop = current_tick;
  40. +
  41. + dr_start = current_tick;
  42. + for(x = 0; x < max ; x++)
  43. + y = d_test[x%512];
  44. + dr_stop = current_tick;
  45. +
  46. + line = 0;
  47. + _DEBUG_PRINTF("IRAM R %d ticks", ir_stop - ir_start);
  48. + _DEBUG_PRINTF("IRAM W %d ticks", iw_stop - iw_start);
  49. + _DEBUG_PRINTF("DRAM R %d ticks", dr_stop - dr_start);
  50. + _DEBUG_PRINTF("DRAM W %d ticks", dw_stop - dw_start);
  51. + lcd_update();
  52. +
  53. +
  54. + while(button_get_w_tmo(HZ/10) != (DEBUG_CANCEL|BUTTON_REL)) ;
  55. +
  56. +#endif
  57. lcd_setfont(FONT_UI);
  58. return false;
  59. }
Add Comment
Please, Sign In to add comment