[En-Nut-Discussion] SAM7S128 UART0 / UART1 problem

Tamas Szabo sza2king at freemail.hu
Sun Jul 4 00:02:24 CEST 2010


Hello,

> Your code sample uses
> freopen(DEV_DEBUG_NAME, "w", stdout);
> :-)
You are correct, Harald - it was my mistake.

Well, I tried to clarify the case - FYI, I'm a newbie in this business:-)

So, my experiences:

I put some LED blinking code to the very beginning of the application. 
With DEV_DEBUG / DEV_DEBUG_NAME it is OK, LED blinks a few times after 
reset.

However, in case of DEV_UART (or DEV_UART0, DEV_UART1) and DEV_UART_NAME 
(or DEV_UART0_NAME, DEV_UART1_NAME) - there is no activity et al.

It seems, with this little modification compiler make a quite different 
binary.

Later I compared the map files generated in both cases. It seems for 
AT91 there is two different routines for normal UART and DBGU. Namely: 
usart0at91.c (usart1at91.c) and at91_dbgu.c. And those are even not 
similar. I think the handling of DBGU and the other two serial port is 
different, but I had no time to check in the datasheet still.

Furthermore, I use At91SAM7S128 - but even if I can setup S128 in 
nutconf, the supporting files does not contains the corresponding 
'#define' and the compilation of the system stops with errors (at least 
I had to add my CPU in irqreq.h and debug.h).

Unfortunately I think I'm still far from the solution, but I try to 
examine it deeper.

However if anyone has a working solution, or any idea it is very welcome:-)

/sza2



More information about the En-Nut-Discussion mailing list