Projetos_afg
Junior Member level 3
- Joined
- Feb 3, 2010
- Messages
- 28
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,293
- Location
- São Paulo, Brazil.
- Activity points
- 1,428
Hi every one!
I have bought the FRDM-KL25Z board wich cames with MKL25Z128VLK4 microcontroller, and since then I have tried to write an simple asm code to write something on GPIO port. I'm using the Keil uVision IDE, and the OPEN SDA debugger that comes on board. First of all I need to enable the Port clock writing the SIM_SCGC5 register. But when I do it Keil show the following error:
The program continues to execute, but the SIM_SCGC5 register remains unchanged. I'm running at Privileged mode and I don't know what is happening that prevents me to write to SIM_SCGC5 register.
Here the code:
Thank you for attention!
I have bought the FRDM-KL25Z board wich cames with MKL25Z128VLK4 microcontroller, and since then I have tried to write an simple asm code to write something on GPIO port. I'm using the Keil uVision IDE, and the OPEN SDA debugger that comes on board. First of all I need to enable the Port clock writing the SIM_SCGC5 register. But when I do it Keil show the following error:
Code:
*** error 65: access violation at 0x40048038 : no 'write' permission
The program continues to execute, but the SIM_SCGC5 register remains unchanged. I'm running at Privileged mode and I don't know what is happening that prevents me to write to SIM_SCGC5 register.
Here the code:
Code:
ldr R0, =0x00001000 ;Enables PORTD clock
ldr R1, =0x40048038 ;Loads SIM_SCGC5 adress
str R0, [R1] ;Writes to SIM_SCGC5
Thank you for attention!