[En-Nut-Discussion] problem using fflush() (Klaus Kloos)

Ole Reinhardt ole.reinhardt at embedded-it.de
Mon Oct 24 13:53:46 CEST 2011


Hi Klaus,

> 	    outr(PIOA_PDR, _BV(1));     	// PIO Disable Register
> // here I can see an additional 200us reset pin on the scope
> 	   zeichen = 0;
> 	   gesendet = fwrite(&zeichen, 1, 1, dmxOut);			// Startcode=0
> 
> 	    gesendet = fwrite(buffer, 1, 512, dmxOut);
> 	    fflush(dmxOut);
> 	    NutSleep(10);

After disabling the PIO, the UART will gain back the control. You will
see the default UART output level, until the data transmissions starts.
It might take additional time until the first data is send out, as some
thread switching might be needed before.

So you might better want to implement the break function directly into
the UART driver.

Bye,

Ole

-- 

Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting

http://www.embedded-it.de

Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 




More information about the En-Nut-Discussion mailing list