with the following code I am getting 2.4MHz-2.5MHz PWM pulse on the GPIO, for each interval. Is that the fastest? Anyway I can configure it to be faster to 50MHz?
I am using omap3430. This pieces of code is running on linux kernel.
while(!kthread_should_stop())
{
//printk( "my thread CurrTime: (%li)\n", (ktime_t)ktime_get());
//gpio_set_value( GPIO_130_CLK, !gpio_get_value(GPIO_130_CLK) );
set_current_state(TASK_RUNNING);
for(i = 0; i <= 960; i++)
{
gpio_set_value( GPIO_130_CLK,HIGH);
gpio_set_value( GPIO_130_CLK,LOW);
}
gpio_set_value( GPIO_130_CLK, LOW );
set_current_state(TASK_INTERRUPTIBLE);
//if(!kthread_should_stop())
//schedule();
schedule_timeout(1L);
//schedule_hrtimeout();
set_current_state(TASK_RUNNING);
}
__set_current_state(TASK_RUNNING);