Part Number: AM3352
I am using ti sdk V03_03_00_04
I want to use the timer4 ,however it make the ethernet down ,strange,can any one tell me why?
[ 97.527357] omap_hwmod: davinci_mdio: _wait_target_ready faile d: -16
[ 97.534596] kernel[402]: [ 97.527357] omap_hwmod: davinci_mdio: _wait_targe t_ready failed: -16
[ 98.540502] cpsw 4a100000.ethernet eth0: Link is Down
I just to want every 100ms ,there is interrupt . here is my code ,
p_hd_timer_device->hd_timer=omap_dm_timer_request_by_node(timer_dn);
omap_dm_timer_set_source(p_hd_timer_device->hd_timer, OMAP_TIMER_SRC_SYS_CLK);
p_hd_timer_device->irq_num=omap_dm_timer_get_irq(p_hd_timer_device->hd_timer);
result = request_irq(p_hd_timer_device->irq_num, timer_irq_handler, IRQF_TIMER, DRIVER_NAME, NULL);
/* Setup the timer to trigger the IRQ on the match event */
omap_dm_timer_set_int_enable(p_hd_timer_device->hd_timer, OMAP_TIMER_INT_OVERFLOW);
timer_rate=clk_get_rate(omap_dm_timer_get_fclk(p_hd_timer_device->hd_timer));
p_hd_timer_device->period_ticks= timer_rate/10;
printk("the period tick :%d rate:%d\n",p_hd_timer_device->period_ticks,timer_rate);
omap_dm_timer_set_pwm(p_hd_timer_device->hd_timer, 0, 1, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE);
omap_dm_timer_enable(p_hd_timer_device->hd_timer);
omap_dm_timer_write_counter(p_hd_timer_device->hd_timer, (0xFFFFFFFF - 5));
omap_dm_timer_set_load(p_hd_timer_device->hd_timer, 1, 0xffffffff - p_hd_timer_device->period_ticks);
match=p_hd_timer_device->period_ticks/2;
omap_dm_timer_set_match(p_hd_timer_device->hd_timer, 1,0xffffffff - match);
omap_dm_timer_start(p_hd_timer_device->hd_timer);