mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-01-11 23:43:04 +00:00
Use GetRTTC() for measuring durations
The high res timer is only 12 bits (4096 ms)
This commit is contained in:
parent
b626e1697c
commit
c08773b213
6
fpga.c
6
fpga.c
@ -905,7 +905,7 @@ unsigned char GetFPGAStatus(void)
|
||||
|
||||
|
||||
void fpga_init(const char *name) {
|
||||
unsigned long time = GetTimer(0);
|
||||
unsigned long time = GetRTTC();
|
||||
int loaded_from_usb = USB_LOAD_VAR;
|
||||
|
||||
// load the global MISTCFG.INI here
|
||||
@ -920,8 +920,8 @@ void fpga_init(const char *name) {
|
||||
unsigned char ct;
|
||||
|
||||
if (ConfigureFpga(name)) {
|
||||
time = GetTimer(0) - time;
|
||||
iprintf("FPGA configured in %lu ms\r", time >> 20);
|
||||
time = GetRTTC() - time;
|
||||
iprintf("FPGA configured in %lu ms\r", time);
|
||||
} else {
|
||||
iprintf("FPGA configuration failed\r");
|
||||
FatalError(8); // 3
|
||||
|
||||
@ -7,7 +7,7 @@ IDXFile sd_image[SD_IMAGES];
|
||||
void IDXIndex(IDXFile *pIDXF) {
|
||||
// builds index to speed up hard file seek
|
||||
FIL *file = &pIDXF->file;
|
||||
unsigned long time = GetTimer(0);
|
||||
unsigned long time = GetRTTC();
|
||||
FRESULT res;
|
||||
|
||||
pIDXF->clmt[0] = SZ_TBL;
|
||||
@ -19,8 +19,8 @@ void IDXIndex(IDXFile *pIDXF) {
|
||||
iprintf("Error indexing (%d), continuing without indices\n", res);
|
||||
file->cltbl = 0;
|
||||
} else {
|
||||
time = GetTimer(0) - time;
|
||||
iprintf("File indexed in %lu ms, index size = %d\n", time >> 16, pIDXF->clmt[0]);
|
||||
time = GetRTTC() - time;
|
||||
iprintf("File indexed in %lu ms, index size = %d\n", time, pIDXF->clmt[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
6
tos.c
6
tos.c
@ -924,7 +924,7 @@ static void tos_upload_mist1(const char *name) {
|
||||
}
|
||||
#endif
|
||||
|
||||
time = GetTimer(0);
|
||||
time = GetRTTC();
|
||||
tos_debugf("Uploading ...");
|
||||
|
||||
for(i=0;i<blocks;i++) {
|
||||
@ -1001,9 +1001,9 @@ static void tos_upload_mist1(const char *name) {
|
||||
}
|
||||
#endif
|
||||
|
||||
time = GetTimer(0) - time;
|
||||
time = GetRTTC() - time;
|
||||
tos_debugf("TOS.IMG uploaded in %lu ms (%d kB/s / %d kBit/s)",
|
||||
time >> 20, f_size(&file)/(time >> 20), 8*f_size(&file)/(time >> 20));
|
||||
time, f_size(&file)/(time >> 20), 8*f_size(&file)/time);
|
||||
f_close(&file);
|
||||
} else {
|
||||
tos_debugf("Unable to find tos.img");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user