所以當 CPU 對 GPIO register 寫資料時,是同步在 60MHz...
 ldr   r0, =GPIO1_PAD_EN
 mov   r1, #0x00100000 ; pin 20
 str   r1,[r0]
 ldr   r0, =GPIO1_CTRL20
 mov   r1,#0x120
 mov   r2,#0x160
1 
 str   r1,[r0]
 nop
 str   r2,[r0]
 nop
 b     %b1  
這一段 code,有沒有加 nop 輸出的方波都是 10MHz。
但是把 nop 改為
 str   r1,[r0]
 str   r1,[r0]
 str   r2,[r0]
 str   r2,[r0]
 b     %b1  
這樣改完,輸出方波變成 5MHz。
也就是說..如果一直 polling 週邊得的話,就等於是用 60MHz 在跑....
沒有留言:
張貼留言