Hai everyone !
I wanna set C5515 eZdsp sampling rate to 48KHz. What I must do so that I can set sampling rate of my board ? I've read some literatures but always failed.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hai everyone !
I wanna set C5515 eZdsp sampling rate to 48KHz. What I must do so that I can set sampling rate of my board ? I've read some literatures but always failed.
What do you mean by "sampling ralock rate? Is it CPU clock rate? Are you aware of the CSL, Chip Support Library?
Regards.
Yaa, sampling rate = CPU clock rate so that my dsp board can work in frequency 48 KHZ. Can you help me what step so that I can set CPU clock rate is ?
Refer to the GEL file in CSL on how to program the PLL. By the way, whay sure a sloooooow speed?
Ya, my teacher asked me like that but he has never taught me how to program C5515.
Ok, You can refer to the System Clock Generator chapter in System User's Guide on this page: http://www.ti.com/product/TMS320C5515/technicaldocuments.
On Table 1-11, there are examples on dufferent frequencies.
However, 48kHz is way to low. What is the reason for such setting?
Regards.
I have read System User's Guide, but I still confused about the C script. Can you give me an example of the C script to configure PLL clock ?
Thanks
As your teacher and I pointed out, GEL file is a good example on how to program the PLL. Let me explain further:
Using the c5505evm_pg20.gel file as an example, the function "ProgramPLL_40MHz_clksel0", these four codes are to program the registers to set PLL output clock as 40MHz. You can use the same assembler codes embedded in C. Follow the steps and equations in System User's Guide to determine proper values.
As I have asked proviously, 48kHz is too slow to be stable. Recommend to enable the CLKOUT and to scope the actual PLL_OUT.
*(short *)PLL_CNTL1@IO = 0x8988;
*(short *)PLL_CNTL2@IO = 0x8000;
*(short *)PLL_CNTL3@IO = 0x0806;
*(short *)PLL_CNTL4@IO = 0x0201;
Hope this help you to learn.
Regards.
My teacher asked me to program PLL for 48KHz because it is basically audio frequency.
I have read C5515 gel and I confused bit. For example, I wanna set PLL to 100 MHz, 120 MHz, and 60 MHz. This is the code from gel :
ProgramPLL_100MHz() { int i; GEL_TextOut("Configuring PLL (100 MHz).\n"); /* Enable clocks to all peripherals */ *(short *)PCGCR1@IO = 0x0; *(short *)PCGCR2@IO = 0x0; /* Bypass PLL */ *(short *)CCR2@IO = 0x0; /* Set CLR_CNTL = 0 */ *(short *)CGCR1@IO = *(short *)CGCR1@IO & 0x7FFF; *(short *)CGCR1@IO = 0x8BE8; *(short *)CGCR2@IO = 0x8000; *(short *)CGCR3@IO = 0x0806; *(short *)CGCR4@IO = 0x0000; /* Wait for PLL lock */ for(i=0;i<0x7fff;i++); /* Switch to PLL clk */ *(short *)CCR2@IO = 0x1; GEL_TextOut("PLL Init Done."); } ProgramPLL_120MHz() { int i; GEL_TextOut("Configuring PLL (120 MHz).\n"); /* Enable clocks to all peripherals */ *(short *)PCGCR1@IO = 0x0; *(short *)PCGCR2@IO = 0x0; /* Bypass PLL */ *(short *)CCR2@IO = 0x0; /* Set CLR_CNTL = 0 */ *(short *)CGCR1@IO = *(short *)CGCR1@IO & 0x7FFF; *(short *)CGCR1@IO = 0x8E4B; *(short *)CGCR2@IO = 0x8000; *(short *)CGCR3@IO = 0x0806; *(short *)CGCR4@IO = 0x0000; /* Wait for PLL lock */ for(i=0;i<0x7fff;i++); /* Switch to PLL clk */ *(short *)CCR2@IO = 0x1; GEL_TextOut("PLL Init Done."); } ProgramPLL_60MHz() { int i; GEL_TextOut("Configuring PLL (60 MHz).\n"); /* Enable clocks to all peripherals */ *(short *)PCGCR1@IO = 0x0; *(short *)PCGCR2@IO = 0x0; /* Bypass PLL */ *(short *)CCR2@IO = 0x0; /* Set CLR_CNTL = 0 */ *(short *)CGCR1@IO = *(short *)CGCR1@IO & 0x7FFF; *(short *)CGCR1@IO = 0x8724; *(short *)CGCR2@IO = 0x8000; *(short *)CGCR3@IO = 0x0806; *(short *)CGCR4@IO = 0x0000; /* Wait for PLL lock */ for(i=0;i<0x7fff;i++); /* Switch to PLL clk */ *(short *)CCR2@IO = 0x1; GEL_TextOut("PLL Init Done."); }
The difference values are just in CGCR1. Can you teach me how to calculate the value of CGCR1 ?
If your 48kHz is intended for audio signals, I am not sure you want to set the system clock / PLL output to 48kHz. Instead, more like a peripheral clock as I2S.
Are you aware of this C55 Teaching ROM? It explains a lot of the basic DSP and C55 that I believe would be very useful for you and any newbies.
http://e2e.ti.com/group/universityprogram/educators/w/wiki/2040.c5000-teaching-rom.aspx
Regards.
Yes. Refer to this page to learn more about the family:
http://processors.wiki.ti.com/index.php/C5504/05/14/15_Family
Regards.