[Ethernut] Bardzo dziwny problem z USART

Witam!

Prubuję uruchomić komunikację via RS 232 z mikrokontrolerem ATmega128 pracującym pod kontrolą Ethernuta.

Od wczoraj męczę się z bardzo dziwnym problemem.

To kod, który działać nie chce: int main(void) { unsigned long baud = 19200; NutRegisterDevice(&devUsartAvr0, 0, 0); freopen("uart0", "r+", stdout); _ioctl(_fileno(stdout), UART_SETSPEED, &baud);

for(;;) { fprintf(stdout, "hubabuba...\n"); } return 0; }

A to kod który działa całkiem ładnie: int main(void) { unsigned long baud = 19200; NutRegisterDevice(&DEV_DEBUG, 0, 0); freopen(DEV_DEBUG_NAME, "r+", stdout); _ioctl(_fileno(stdout), UART_SETSPEED, &baud);

for(;;) { fprintf(stdout, "hubabuba...\n"); } return 0; }

W czym może tkwić problem? Google w zasadzie milczą na ten temat. Kod został wzięty z przykładów do Ethernuta.

Reply to
Daniel Jaworski
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.