[arch][arm-m] move some hand coded register inits to the CMSIS struct

No functional change.
This commit is contained in:
Travis Geiselbrecht
2019-06-12 14:25:39 -07:00
parent 8dca2206d2
commit a8d82f3ab0

View File

@@ -102,9 +102,9 @@ void arch_early_init(void)
void arch_init(void)
{
#if ENABLE_CYCLE_COUNTER
*REG32(SCB_DEMCR) |= 0x01000000; // global trace enable
*REG32(DWT_CYCCNT) = 0;
*REG32(DWT_CTRL) |= 1; // enable cycle counter
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
DWT->CYCCNT = 0;
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; // enable cycle counter
#endif
printf("CONTROL 0x%x\n", __get_CONTROL());
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)