Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: why doesnt this code work on my AT91RM9200 (newbie)
PostPosted: Sat Jan 01, 2005 7:00 am 
Offline

Joined: Sat Jan 01, 2005 6:57 am
Posts: 8
Location: India
Hi,


Im an undergrad student, and a newbie to the ARM and embedded systems in general. Im working on a
board based on the AT91RM9200 uC. Im relying on the default boot
program, and im using the xmodem protocol to load the foll. program
thru hyperterminal. Im just sending a nibble to the I/O pins, expecting
to verify the effect with a multimeter. but this isnt working:


#include <stdio.h>
int main()


{
__asm

{
start:MOV r1, #0xFFFFF800 //PIO C
MOV r0,#0xF //only the last 4 pins needed
STR r0, [r1] //send to PIO_PER
MOV r0, #0

STR r0, [r1, #0x4] //send to PIO_PDR
MOV r0, #0xF //output enabled on last 4 pins

STR r0, [r1, #0x10]//send to PIO_OER
MOV r0, #0

STR r0, [r1, #0x14] //send to PIO_ODR
MOV r0, #0xF //sync output on last 4 pins

STR r0, [r1, #0xA0] //send to PIO_OWER
MOV r0, #0

STR r0, [r1, #0xA4] //send to PIO_OWDR
MOV r0, #0xA
STR r0, [r1, #0x38] //send this to the pins
loop: B loop //infinite loop


}
}


after this -> (im using the Arm Devel Suite toolchain :? )

armcc -c test.c
armlink test.o -o test.axf
fromelf test.axf -bin -o test.bin


then i load this bin file onto the controller. But nothing
happens..whats going on :-(


thanx in anticipation
Mayank


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: