Dear Sir,
I am using the TMS320C6416 - 720MHz DSK board. I am planning to connect the DSP to ADC/DAC in future board design and implementation. However, I have found some problem about the EMIF's maximum read/write speed.
We need a sampling speed of ADC and DAC at least of 30MHz. I have configured the EMIF control register to make it work at maximum speed (Asynchrous 32 bit, Write/Read Setup=Strobe=1 ECLKOUT, HOLD=0) and our ECLKOUT is 120MHz.. However, when I measure the output frequency of the data at the EMIF connector pin using oscilloscope, I have found that the maximum frequency is only 16MHz. I also tried to change the Asynchronous to Synchronous 32-bit mode and set the read/write latency to 0 cycle, but the result is the same 16MHz maximum speed!
The output/input action through EMIF is conducted by Timer ISRs. Here is the code of the main program:
EMIFA_Config MyConfigA =
{
0x00012060, /* gblctl */ // ECLKOUT2 = ECLKOUT1, clkout4,6 disable
0x10418120, /* CE-0 */ // 32-bit Async, Write/Read: setup=1, strobe=1, hold=0, TA=2 (ECLKOUT)
0x10418120, /* CE-1 */
0x10418120, /* CE-2 */
0x10418120, /* CE-3 */
0x0248F000, /* sdctl */
0x005DC5DC, /* sdtim */
0x00175F3F, /* sdext */
0x00000000, /* cesec0 */
0x00000000, /* cesec1 */
0x00000000, /* cesec2 */
0x00000000 /* cesec3 */
};
TIMER_Config MyTimerConfig1 =
{
0x000003C1, /* ctl */ /* TSAT signal->TOUT pin, Clock mode */
0x00000002, /* 22 MHz */
0x00000000 /* cnt */
};
#define OUTPUT 0xA0000000 // CE2 space for ADC/DAC access
int *output= (int*) (OUTPUT);
unsigned int data = 0;
interrupt void Timer1_ISR(void)
{
*(output) = data;
if(data==0){
data = 1;
}
else{
data = 0;
}
}
void main()
{
EMIFA_config(&MyConfigA);
hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
TimerEventId_1 = TIMER_getEventId(hTimer1);
IRQ_map(TimerEventId_1, 15);
while(1){
TIMER_config(hTimer1, &MyTimerConfig1);
TIMER_start(hTimer1);
IRQ_enable(TimerEventId_1);
IRQ_nmiEnable();
IRQ_globalEnable();
while(1);
IRQ_disable(TimerEventId_1);
IRQ_globalDisable();
IRQ_nmiDisable();
*(unsigned int *) TIMER1_CTRL = 0x00000000; // Disable Timer1
}
}
We need to use EMIF at minimum of 30MHz. However, When I set the Timer to work at higher than 16MHz, the EMIF output remains at 16MHz.. I donnot know whether I have done something wrong about the EMIF register setting, or the Timer ISR problem.. How can I achieve higher EMIF read/write speed(30MHz is ideally) using this Timer ISR routine? I will greatly appreciate if anyone can help!
Sung Kim.