Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having trouble getting my alarm to trigger. So the problem is that when you hit a button on the board, the program counts to ten and then runs a stepper motor. It is all based off the RTC and the alarm is generated by adding ten to the RTC and when the alarm and RTC are equal, the flag is set for Alarm A. I cannot get this part to happen. 



	LDR r0, =RTC_BASE
	LDR r1, [r0, #RTC_TR]
	STR r0, [r1]
	ADD r0, r0, #0x10
	BL BIN2BCD
	LDR r2, =RTC_BASE
	LDR r1, [r2, #RTC_ALRMAR]
	MOV r1, r0
	STR r1, [r2, #RTC_ALRMAR]
here is where I add 10 to the RTC and write it to the address of the alarm. 

This should spin a motor after 10 seconds after a button is pressed.


What I have tried:

I have the alarm initialized and the alarm handler written but cannot get the alarm to trigger. I don't know where I am going wrong.
Posted
Comments
Richard MacCutchan 18-Apr-19 4:04am    
You do realise that you are adding 16 not 10.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900