Part Number: TMDSDSK6416
Other Parts Discussed in Thread: TMS320C6416T
Hello,
I'm trying generate short pulses with DSP's 32-bit timer. I'm using the DSK6416 board. I need to have pulse widths as short as 50ns-100ns and be able to change the duty-cycle. I try to read the CNT register of the timer and set DATOUT to be driven on TOUT pin of timer when the proper width has reached. The problem is that when I use the TIMER_setDatOut API it is not possible to get 50-100ns pulse widths. The shortest pulse width you can get is 150ns. Here is my simple code:
#include <stdio.h>
#include <csl.h>
#include <csl_timer.h>
TIMER_Handle hTimer;
TIMER_Config MyConfig = {
0x00000300, //Clock mode, Internal clock source f_cpu/8, DATOUT is driven on TOUT DSK runs at 1GHz
0x0000003E, //f=125MHz/(this value) 1MHz frequency as an example
0x00000000
};
void main()
{
CSL_init();
TIMER_config(hTimer,&MyConfig);
hTimer = TIMER_open(TIMER_DEV0,0);
TIMER_start(hTimer);
while(1)
{
if(TIMER_getCount(hTimer)<10){
TIMER_setDatOut(hTimer,1);}
else
{
TIMER_setDatOut(hTimer,0);}
}
}
.
Thank you for your help