[En-Nut-Discussion] Nut/OS in STK300

Harald Kipp harald.kipp at egnite.de
Wed Sep 17 09:40:45 CEST 2003


Hi Janne,


>Any hints what do I need to change in order to get UART to work in
>STK300 meaning in ATMega103 generally ?
>
>Is it necessary to enable this flag for example? (STK300 is 4MHz)
>DEFS = -DNUT_CPU_FREQ=3686400

This definition is only required if the 32kHz crystal is not
mounted.

>I saw some comment in sources about this being for 1ms resolution
>enable, but what if it is not defined ? Does it make timers&rtc still to
>work but with worse resolution ?

If NUT_CPU_FREQ is not defined, the resolution is 62.5 ms,
using the 32 kHz crystal. Taking this as a reference, Ethernut
is able to determine its main crystal frequency.


>Currently app/threads works nicely with 3 different threads blinking
>leds with specific speed defined differetnly for each threads. However,
>LCD and UART shows random rubbish only ...

For LCD it may be a hardware timing problem. For the
UART, check the baudrate table in the ATmega datasheet,
specially the deviation.


>I set nutconf to stk200 and atmega103. Whatever stk200 then defines, I
>have no idea.

The STK200 defines the type of programming adapter you're
using. This definition enables to simply call

   make burn

on the command line.

Harald




More information about the En-Nut-Discussion mailing list