FreeCalypso > hg > freecalypso-tools
diff target-utils/calversion/dsp_bringup.c @ 498:ca98f800bbf3
calversion utility: removed osmo_delay_ms()
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 25 May 2019 21:30:23 +0000 |
parents | 1dcc9e4b71fd |
children |
line wrap: on
line diff
--- 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); }