> > I couldn't find that reset mode in the hal_parport.  At least not how you 
> > could have a step that lasted 5uS when the base period
> was 35uS.  How's that timing calculated?
> 
> setp parport.0.reset-time 5000
>  In the doc I linked earlier

Ends up being  reset_time in the reset_port() function.   Can't find when or 
how reset_port() is called.  

Looks a lot like the system sets up a loop inside one of the tasks burning CPU 
cycles until 5 micro-seconds has passed by calling the rtapi_get_clocks() 
function.  

    if(port->reset_time > period/4) port->reset_time = period/4;
    reset_time_tsc = ns2tsc(port->reset_time);

    if(outdata != port->outdata) {
        deadline = port->write_time + reset_time_tsc;
        while(rtapi_get_clocks() < deadline) {}
        rtapi_outb(outdata, port->base_addr);
    }


I do something similar (as a temporary measure until I get the FREE RTOS 
installed)   The LED is just there so I can verify the time delay with the 
scope.  But I'm not fond of that technique.

void 
Delay10uS(int32 delay) {
 uint32 timedelay;
    bANB_LED3 = 1;  // For now pulse LED so we can see if it's being used in 
normal LCD operations.
    timedelay = ReadCoreTimer() + (400*delay);
    while (ReadCoreTimer() < timedelay) ;
    bANB_LED3 = 0;
}




> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to