Changeset 9043e7e0 in mainline


Ignore:
Timestamp:
2013-01-20T00:27:35Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7a38962
Parents:
9eec7bc
Message:

arm32: Count every 64th cycle.

The coutner is 32bit, at 600Mhz it overflows after 7m instead of 7s.

Location:
kernel/arch/arm32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/cycle.h

    r9eec7bc r9043e7e0  
    5656           return ((uint64_t)high << 32) | low;
    5757        } else {
    58                 return PMCCNTR_read();
     58                return (uint64_t)PMCCNTR_read() * 64;
    5959        }
    6060#endif
  • kernel/arch/arm32/src/cpu/cpu.c

    r9eec7bc r9043e7e0  
    170170
    171171#ifdef PROCESSOR_ARCH_armv7_a
    172         PMCR_write(PMCR_read() | PMCR_E_FLAG);
     172        PMCR_write(PMCR_read() | PMCR_E_FLAG | PMCR_D_FLAG);
    173173        PMCNTENSET_write(PMCNTENSET_CYCLE_COUNTER_EN_FLAG);
    174174#endif
Note: See TracChangeset for help on using the changeset viewer.