반응형
Software reset macro for ATMEL AT91SAM9R64/RL64
[cpp ]
#define soft_user_reset()
asm volatile (
/* disable IRQs */
"MRS R0, CPSR nt"
"ORR R0, R0, #0x80 nt"
"MSR CPSR_c, R0 nt"
/* change refresh rate to block all data accesses */
"LDR R0, =0xFFFFEA04 /* AT91C_SDRAMC_TR*/ nt"
"LDR R1, =1 nt"
"STR R1, [R0] nt"
/*prepare power down command*/
"LDR R0, =0xFFFFEA10 /* AT91C_SDRAMC_LPR */ nt"
"LDR R1, =2 nt"
/* prepare proc_reset and periph_reset*/
"LDR R2, =0xFFFFFD00 /* AT91C_RSTC_RCR */ nt"
"LDR R3, =0xa5000005 nt"
/* perform power down commnad */
"STR R1, [R0] nt"
/* perform proc_reset and periph_reset*/
"STR R3, [R2] nt"
)
[/cpp]
Ref. ATMEL AT91SAM ARM-Based Embedded MCU AT91SAM9R64/RL64 p.885
반응형
'OldStory > WORKS' 카테고리의 다른 글
Gstreamer android tutorial (0) | 2013.02.26 |
---|---|
Android PDK 환경에서 빌드 (0) | 2012.04.25 |
queue (0) | 2011.12.22 |
ffmpeg compile options (0) | 2011.11.16 |
ARM SYMPOSIUM (0) | 2011.11.15 |