Benchmark code
This commit is contained in:
parent
9eb92caa6c
commit
a18b197ac4
2 changed files with 24 additions and 7 deletions
14
fw/main.c
14
fw/main.c
|
|
@ -245,12 +245,13 @@ int main(void) {
|
|||
RCC->CFGR |= (2<<RCC_CFGR_SW_Pos);
|
||||
SystemCoreClockUpdate();
|
||||
|
||||
SysTick_Config(SystemCoreClock/1000); /* 1ms interval */
|
||||
NVIC_DisableIRQ(SysTick_IRQn);
|
||||
//SysTick_Config(SystemCoreClock/1000); /* 1ms interval */
|
||||
//NVIC_DisableIRQ(SysTick_IRQn);
|
||||
SysTick->VAL = 0U;
|
||||
SysTick->LOAD = 0x00FFFFFF;
|
||||
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
|
||||
while (42) {
|
||||
static int tick __attribute__((used));
|
||||
static int cvr __attribute__((used));
|
||||
tick = sys_time;
|
||||
static unsigned int cvr __attribute__((used));
|
||||
cvr = SysTick->VAL;
|
||||
//if (fb_op == FB_FORMAT) {
|
||||
transpose_data(rx_buf, write_fb);
|
||||
|
|
@ -259,8 +260,7 @@ int main(void) {
|
|||
// while (fb_op == FB_UPDATE)
|
||||
// ;
|
||||
//}
|
||||
tick = sys_time - tick;
|
||||
cvr = SysTick->VAL - cvr;
|
||||
cvr = cvr - SysTick->VAL;
|
||||
asm volatile ("bkpt");
|
||||
}
|
||||
//LL_Init1msTick(SystemCoreClock);
|
||||
|
|
|
|||
17
fw/measure_transpose_performance.gdb
Normal file
17
fw/measure_transpose_performance.gdb
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
target remote localhost:3333
|
||||
file main.elf
|
||||
load
|
||||
set print pretty on
|
||||
set pagination off
|
||||
cont
|
||||
print cvr/50.0F
|
||||
cont
|
||||
print cvr/50.0F
|
||||
cont
|
||||
print cvr/50.0F
|
||||
cont
|
||||
print cvr/50.0F
|
||||
cont
|
||||
print cvr/50.0F
|
||||
cont
|
||||
quit
|
||||
Loading…
Add table
Add a link
Reference in a new issue