comparison 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
comparison
equal deleted inserted replaced
497:74610c4f10f7 498:ca98f800bbf3
151 //----------------------------------------------------------------- 151 //-----------------------------------------------------------------
152 // After RESET release, DSP is in SAM Mode ! while API_CNTR (0xF900) 152 // After RESET release, DSP is in SAM Mode ! while API_CNTR (0xF900)
153 // register is in reset state: HOM mode, PLL off, Bridge off. No ws 153 // register is in reset state: HOM mode, PLL off, Bridge off. No ws
154 // are applied for MCU<-->API access !!!!! So, MCU must wait for 154 // are applied for MCU<-->API access !!!!! So, MCU must wait for
155 // end of Leadboot execution before accessing API. 155 // end of Leadboot execution before accessing API.
156 //wait_ARM_cycles(convert_nanosec_to_cycles(10000)); // wait 10us 156 /*
157 osmo_delay_ms(10); 157 * TI's firmware code waits 10 us, but we'll give it a more generous
158 * 1 ms because our clocking setup is a little different, coming from
159 * the boot ROM: on platforms with 13 MHz CLKTCXO the DSP will run
160 * at the same frequency as the ARM, rather than the typical double.
161 */
162 wait_ARM_cycles(13000);
158 163
159 // NO DOWNLOAD... 164 // NO DOWNLOAD...
160 { 165 {
161 // Wait for READY status from DSP. 166 // Wait for READY status from DSP.
162 printf("Waiting for DSP bootloader READY status\n"); 167 printf("Waiting for DSP bootloader READY status\n");
214 printf("Booting DSP main code\n"); 219 printf("Booting DSP main code\n");
215 *(volatile UWORD16 *) DOWNLOAD_SIZE = 0; // Size=0 to force DSP to start from address... 220 *(volatile UWORD16 *) DOWNLOAD_SIZE = 0; // Size=0 to force DSP to start from address...
216 *(volatile UWORD16 *) DOWNLOAD_ADDR = dsp_start_address; // Start address. 221 *(volatile UWORD16 *) DOWNLOAD_ADDR = dsp_start_address; // Start address.
217 *(volatile UWORD16 *) DOWNLOAD_STATUS = BLOCK_READY; // Start DSP... 222 *(volatile UWORD16 *) DOWNLOAD_STATUS = BLOCK_READY; // Start DSP...
218 223
219 osmo_delay_ms(50); 224 /* give it a very generous 50 ms wait */
225 wait_ARM_cycles(13000 * 50);
220 printf("DSP reports version 0x%04X 0x%04X\n", 226 printf("DSP reports version 0x%04X 0x%04X\n",
221 dsp_ndb_ptr->d_version_number1, dsp_ndb_ptr->d_version_number2); 227 dsp_ndb_ptr->d_version_number1, dsp_ndb_ptr->d_version_number2);
222 } 228 }