Hi! I'm new on ARM. I'm using uVision 4.71 with j-link + LPC1343 cortex-m3 running following code:
movw r0,#0x0001 ;working
ldr r1,=0x4004400c ;working
str r0, [r1, #0] ;not working
movw r0,#0x00ff ;working
ldr r1,=0x50008000 ;working
str r0, [r1] ;working
movw r0,#0x00aa ;working
ldr r1,=0x50003FFC ;working
movw r0,#0x000f ;working
ldr r1,=0x50038000 ;working
movw r0,#0x0002 ;working
ldr r1,=0x40044084 ;working
str r0, [r1] ;not working
movw r0,#0x0000 ;working
ldr r1,=0x50033ffc ;working
seems that addresses = 0x4004xxxx have no permission to writes Can anybody help me?
Yes! I write, but registers do not get the values! I need activate some clock to these registers? Thank you!
Have you checked the documentation for your processor?
It includes information about which peripherials that needs to have the power enabled. And any clock requirements. It really is the user manual - and not this forum - that is the reference to use for this kind of information.
I've checked the documentation of my microcontroller! I thought that might be my problem and I will test next sunday. Thanks everyone and sorry for the inconvenience and my bad english!
Check the documentation of your microcontroller again.
According to user manual UM10375, Section 7.4.32, address 0x4004 4084 is IOCON_PIO3_0.
The only valid values you can store in Bits 2:0 are 0 or 1 (and 1 is not applicable to all parts). If you are using code written by someone else, make sure that it is designed to run on an LPC1343.
It's done! By default, the bit 16 in SYSAHBCLKCTRL(0x40048080) in reset is zero, disabling clocks to IOCON block. So, i put the following code at start of program to solve my problem:
movw r1,#0x8080
movt r1,#0x4004
ldr r0,[r1]
orr r0,#0x10000
str r0,[r1]