le voilà :
#ifndef UART_CONFIG_H #define UART_CONFIG_H /* * UART0 definitions */ /* compile uart0 fonctions, undefine it to pass compilation */ #define UART0_COMPILE /* enable uart0 if == 1, disable if == 0 */ #define UART0_ENABLED 1 /* enable uart0 interrupts if == 1, disable if == 0 */ #define UART0_INTERRUPT_ENABLED 1 #define UART0_BAUDRATE 38400 /* * if you enable this, the maximum baudrate you can reach is * higher, but the precision is lower. */ #define UART0_USE_DOUBLE_SPEED 0 //#define UART0_USE_DOUBLE_SPEED 1 #define UART0_RX_FIFO_SIZE 64 #define UART0_TX_FIFO_SIZE 64 //#define UART0_NBITS 5 //#define UART0_NBITS 6 //#define UART0_NBITS 7 #define UART0_NBITS 8 //#define UART0_NBITS 9 #define UART0_PARITY UART_PARTITY_NONE //#define UART0_PARITY UART_PARTITY_ODD //#define UART0_PARITY UART_PARTITY_EVEN #define UART0_STOP_BIT UART_STOP_BITS_1 //#define UART0_STOP_BIT UART_STOP_BITS_2 /* .... same for uart 1, 2, 3 ... */ Le 26 mai 2009 22:21, Olivier MATZ <z...@droids-corp.org> a écrit : > Salut Antoine, > > Tu pourrais envoyer ton fichier uart_config.h aussi ? > > Olivier > > Antoine albertelli wrote: > > Hello, > > Voilà, j'ai faits quelques tests du module UART de Aversive, et j'ai des > > petits bugs. Tant que je n'active pas les interrupts, tout va très bien. > > Mais dés que je mets un sei() pour utiliser le scheduler, le module UART > > déclenche ce que je pense être un reset du processeur... une idée ? > > Merci pour votre attention > > > > Antoine > > > > P.S. : Je travaille sur Atmega168, et voici mon code (tiré en grande > > partie du code microb 2009) : > > > > int main(void) { > > > > sbi(DDRB,5); > > /* Met la LED en sortie. */ > > > > uart_init(); > > fdevopen(uart0_dev_send, NULL); > > sei(); /* BUG. */ > > for(counter = 0;counter < 5;counter++) { // chenillard pour le reset > > BIT_TOGGLE(PORTB,5); > > wait_ms(500); > > } > > for(;;) printf_P(PSTR("Dass das Gluck deinen Haus setzt.\r\n")); > > return 0; > > } > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Avr-list mailing list > > Avr-list@droids-corp.org > > CVSWEB : http://cvsweb.droids-corp.org/cgi-bin/viewcvs.cgi/aversive > > WIKI : http://wiki.droids-corp.org/index.php/Aversive > > DOXYGEN : http://zer0.droids-corp.org/doxygen_aversive/html/ > > BUGZILLA : http://bugzilla.droids-corp.org > > COMMIT LOGS : http://zer0.droids-corp.org/aversive_commitlog > > > _______________________________________________ > Avr-list mailing list > Avr-list@droids-corp.org > CVSWEB : http://cvsweb.droids-corp.org/cgi-bin/viewcvs.cgi/aversive > WIKI : http://wiki.droids-corp.org/index.php/Aversive > DOXYGEN : http://zer0.droids-corp.org/doxygen_aversive/html/ > BUGZILLA : http://bugzilla.droids-corp.org > COMMIT LOGS : http://zer0.droids-corp.org/aversive_commitlog >
_______________________________________________ Avr-list mailing list Avr-list@droids-corp.org CVSWEB : http://cvsweb.droids-corp.org/cgi-bin/viewcvs.cgi/aversive WIKI : http://wiki.droids-corp.org/index.php/Aversive DOXYGEN : http://zer0.droids-corp.org/doxygen_aversive/html/ BUGZILLA : http://bugzilla.droids-corp.org COMMIT LOGS : http://zer0.droids-corp.org/aversive_commitlog