[En-Nut-Discussion] GPIO19 on Ethernut 3.0
Ralf Spettel
r.spettel at raumcomputer.com
Wed Dec 21 14:26:51 CET 2005
Hi Harald.
Yes, us too. We do our first steps with ARM and NUT3.0.
The first one was to activate our heartbeat LED. With:
#define CPLDBASEADDRESS 0x21000000L
#define LED_gr_ON *((volatile u08 *)CPLDBASEADDRESS+0x18)=0x00
#define LED_gr_OFF *((volatile u08 *)CPLDBASEADDRESS+0x18)=0x04
the onboard LED works fine..
and with the macro
#define LED1(p)
{\
outr(PIO_PER, _BV(16));\
outr(PIO_OER, _BV(16));\
if(p)\
{\
outr(PIO_SODR, _BV(16));\
}\
else\
{\
outr(PIO_CODR, _BV(16));\
}\
}
GPIO16 (18, 19) should do the same...
We test it also with GPIO16 and GPIO18, with the same result...
The part of the heartbeat thread:
// heartbeat led
if (LEDstatus==1)
{
LED_gr_ON;
LED1(1);
LEDstatus=0;
}
else
{
LED_gr_OFF;
LED1(0);
LEDstatus=1;
}
NUTSleep(250);
With Oszi we get the following picture, the blue line ist the onbord LED
and the yellow is GPIO16...
J5 are not chanced... placed like:
JP5 Jumper JP5 routes the JTAG signals
to the AT91R40008, if pins 1 and 2 and pins
5 and 6 are shortened.
Ralf
>Hard to believe...
>
>P19 is unused by default, but may be used to scan TDO
>of the CPLD via jumper JP5. Is JP5 set to default, as
>shown on page 5 of
>http://www.ethernut.de/pdf/ethwm30d.pdf
>
>Harald
More information about the En-Nut-Discussion
mailing list