Sign in

username:

password:



Not a member?

Search c6x



Search tips

Subscribe to c6x



c6x by Keywords

AD535 | BIOS | Booting | Bootloader | C621 | C6211 | C6415 | C671 | C6711 | C6711DSK | C6713 | CCS | Chassaing | COFF | DAT | DM64 | DM642 | DMA | DSK671 | DSK6711 | EDM | EDMA | EMIF | Emulator | EVM | EVM620 | FFT | FIR | GPIO | Halting | HPI | HWI | IDK | JTAG | LDB | LDH | LDW | Linker | LMS | LOG_printf | Matlab | McBSP | MEM_alloc | MIPS | PCI | PCM3003 | Pipeline | Profiling | QDM | Reset | ROM | RTDX | Sampling | SDRAM | Stack | TEB | THS1206 | TMS320C621 | TMS320C6416 | TMS320C6711 | TMS320C6713 | UART | Vector Table | XBUS | XDS560

Ads

Discussion Groups

Discussion Groups | TMS320C6x | Bootloader example with PLL setup

Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).

  

Post a new Thread

Bootloader example with PLL setup - Bob Jones - Mar 1 17:19:00 2006



Hello,

Following the example in SPRA999A we've written a bootloader for our 
custom C6713B based
card. Now we would like to add PLL configuration. Does anyone have an 
example bootloader
which includes the PLL setup? More specifically how and where do you put 
in the requisite delays?

Thanks,
Bob
	


(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

Re: Bootloader example with PLL setup - Bernhard Gustl Bauer - Mar 2 9:49:00 2006

Hello Bob,

below is the code I use.

HTH Gustl
			// Reset PLL
PLL_RSET(PLLCSR,PLL_PLLCSR_RMK(	PLL_PLLCSR_PLLRST_1,
				PLL_PLLCSR_PLLPWRDN_NO,
				PLL_PLLCSR_PLLEN_BYPASS));
PLL_RSET(PLLDIV0,PLL_PLLDIV0_RMK(	PLL_PLLDIV0_D0EN_ENABLE,
					PLL_PLLDIV0_RATIO_OF(0)));
PLL_RSET(PLLM,PLL_PLLM_RMK(PLL_PLLM_PLLM_OF(SYSCLK1_FREQ/CLKI_FREQ)));
		// wait 125 ns; DSP runs with 25MHz/40ns or 20MHz/50ns
for (waittime=0; waittime<4; waittime++);

		// bring PLL out of reset
PLL_RSET(PLLCSR,PLL_PLLCSR_RMK(	PLL_PLLCSR_PLLRST_0,
				PLL_PLLCSR_PLLPWRDN_NO,
				PLL_PLLCSR_PLLEN_BYPASS));
  // wait 187,5 us till PLL locks; DSP runs with 25MHz/40ns or 20MHz/50ns
for (waittime=0; waittime<4688; waittime++);
		// enable PLL
PLL_RSET(PLLCSR,PLL_PLLCSR_RMK(	PLL_PLLCSR_PLLRST_0,
				PLL_PLLCSR_PLLPWRDN_NO,
				PLL_PLLCSR_PLLEN_ENABLE));

Bob Jones schrieb:
> Hello,
> 
> Following the example in SPRA999A we've written a bootloader for our 
> custom C6713B based
> card. Now we would like to add PLL configuration. Does anyone have an 
> example bootloader
> which includes the PLL setup? More specifically how and where do you put 
> in the requisite delays?
> 
> Thanks,
> Bob
>
	


(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

Re: Bootloader example with PLL setup - Bernhard Gustl Bauer - Mar 2 10:47:00 2006

Bob,

Bob Jones schrieb:
> Thanks for the reply.
> Is this code from a bootloader? 

Almost. My bootloader doesn't mess with PLL, so I can use it in 
enviroments with different clocksources.

This is the function that is called first after the bootloader.

 > I thought bootloaders had to be written
> in assembler since the
> C environment had not been setup yet. 

You need a call to _c_int00 before. But you don't need CSL_init()!

 > You do show where the delays are
> needed, that's a
> help Thanks,
> 
> Bob
> 
> Bernhard Gustl Bauer wrote:
> 
>> Hello Bob,
>>
>> below is the code I use.
>>
>> HTH Gustl
>>
>>
>>         // Reset PLL
>> PLL_RSET(PLLCSR,PLL_PLLCSR_RMK(    PLL_PLLCSR_PLLRST_1,
>>                 PLL_PLLCSR_PLLPWRDN_NO,
>>                 PLL_PLLCSR_PLLEN_BYPASS));
>> PLL_RSET(PLLDIV0,PLL_PLLDIV0_RMK(    PLL_PLLDIV0_D0EN_ENABLE,
>>                     PLL_PLLDIV0_RATIO_OF(0)));
>> PLL_RSET(PLLM,PLL_PLLM_RMK(PLL_PLLM_PLLM_OF(SYSCLK1_FREQ/CLKI_FREQ)));
>>         // wait 125 ns; DSP runs with 25MHz/40ns or 20MHz/50ns
>> for (waittime=0; waittime<4; waittime++);
>>
>>         // bring PLL out of reset
>> PLL_RSET(PLLCSR,PLL_PLLCSR_RMK(    PLL_PLLCSR_PLLRST_0,
>>                 PLL_PLLCSR_PLLPWRDN_NO,
>>                 PLL_PLLCSR_PLLEN_BYPASS));
>>  // wait 187,5 us till PLL locks; DSP runs with 25MHz/40ns or 20MHz/50ns
>> for (waittime=0; waittime<4688; waittime++);
>>         // enable PLL
>> PLL_RSET(PLLCSR,PLL_PLLCSR_RMK(    PLL_PLLCSR_PLLRST_0,
>>                 PLL_PLLCSR_PLLPWRDN_NO,
>>                 PLL_PLLCSR_PLLEN_ENABLE));
>>
>> Bob Jones schrieb:
>>
>>> Hello,
>>>
>>> Following the example in SPRA999A we've written a bootloader for our 
>>> custom C6713B based
>>> card. Now we would like to add PLL configuration. Does anyone have an 
>>> example bootloader
>>> which includes the PLL setup? More specifically how and where do you 
>>> put in the requisite delays?
>>>
>>> Thanks,
>>> Bob
>>>
>>
>>
>
	


(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )