Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ARM Cortex M0 Assembly

Status
Not open for further replies.

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:
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!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top