# HG changeset patch # User Mychaela Falconia # Date 1558819823 0 # Node ID ca98f800bbf3f6804054da1899ce2f23e6bbd115 # Parent 74610c4f10f7a7f3bac6c82963dab6c15a387e84 calversion utility: removed osmo_delay_ms() diff -r 74610c4f10f7 -r ca98f800bbf3 target-utils/calversion/dsp_bringup.c --- a/target-utils/calversion/dsp_bringup.c Sat May 25 20:44:05 2019 +0000 +++ b/target-utils/calversion/dsp_bringup.c Sat May 25 21:30:23 2019 +0000 @@ -153,8 +153,13 @@ // register is in reset state: HOM mode, PLL off, Bridge off. No ws // are applied for MCU<-->API access !!!!! So, MCU must wait for // end of Leadboot execution before accessing API. - //wait_ARM_cycles(convert_nanosec_to_cycles(10000)); // wait 10us - osmo_delay_ms(10); + /* + * TI's firmware code waits 10 us, but we'll give it a more generous + * 1 ms because our clocking setup is a little different, coming from + * the boot ROM: on platforms with 13 MHz CLKTCXO the DSP will run + * at the same frequency as the ARM, rather than the typical double. + */ + wait_ARM_cycles(13000); // NO DOWNLOAD... { @@ -216,7 +221,8 @@ *(volatile UWORD16 *) DOWNLOAD_ADDR = dsp_start_address; // Start address. *(volatile UWORD16 *) DOWNLOAD_STATUS = BLOCK_READY; // Start DSP... - osmo_delay_ms(50); + /* give it a very generous 50 ms wait */ + wait_ARM_cycles(13000 * 50); printf("DSP reports version 0x%04X 0x%04X\n", dsp_ndb_ptr->d_version_number1, dsp_ndb_ptr->d_version_number2); }