First steps with ARM GNU ASM on PSoC 4 | Cypress Semiconductor
First steps with ARM GNU ASM on PSoC 4
Hi all, hope this topic fits well here.
Just start trying to learn ASM, so there is a lot of stuff i don't know yet, but i tried a function on ASM and call that function from the main file of ths program. Most of the function is just NOP instructions, so i was expecting 1 or 2 clock cycles expended on each of those (i'm measuring the cycles watching the SysTick Value register on the Memory view while debug session), but i'm getting 4 clock cycles on each :/ .
The function seems to take only 16 clock cycles, but i'm getting about 52.
Optimization is set to None, Debug mode.
Also i have found a register on the ARM site, DWT http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337h/BIIFBHIF.html, it is a cycle counter, but i can't find it on the Register Documentation of the 4200 family, so anyone who can tell me if what i'm doing is well? any thought on another way to measure clock cycles?
Atached the project, it's based on the PSoC 4 Pioneer Kit
Thanks in advance, and excuse for the n00b questions :D