Hi all,
I'm trying to create a timer with sysbios 6 (6.32.05.24) with the LogicPD SOM OMAP l138. I want to create a timer that will call a function every 1us. I will use this function to create a delay in us.
var ADC_timerParams = new Timer.Params();
ADC_timerParams.instance.name = "ADC_timer";
ADC_timerParams.period = 1;
ADC_timerParams.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_AUTO;
ADC_timerParams.arg = "&NULL";
Program.global.ADC_timer = Timer.create(0, "&Delay_us", ADC_timerParams);
The Delay_us function just increment a global variable. The problem is that the variable never increment. I post you my main:
void main(void)
{
PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_GPIO, PSC_POWERDOMAIN_ALWAYS_ON,PSC_MDCTL_NEXT_ENABLE);
//setup the mux for GPIO
GPIOMuxSetup();
GPIODirSetup();
//setup a on board mux
GPIOPinWrite(SOC_GPIO_0_REGS,GPIO_MUX3_A0,GPIO_PIN_LOW);
GPIOPinWrite(SOC_GPIO_0_REGS,GPIO_MUX3_A1,GPIO_PIN_LOW);
GPIOPinWrite(SOC_GPIO_0_REGS,GPIO_MUX4_A0,GPIO_PIN_HIGH);
Timer_start(ADC_timer);
BIOS_start(); // start the sysBIOS
}
I'm probably missing something but i can'T see it...
thanks
Vince