[En-Nut-Discussion] Cycle counter based NutMicroDelay Implementation problems

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Mon Aug 20 11:19:30 CEST 2012


>>>>> "Ole" == Ole Reinhardt <ole.reinhardt at embedded-it.de> writes:

    Ole> Hi all, The Cortex implementation used the System Core Debug unit
    Ole> CPU Cycle counter to implement a high precise NutMicroDelay()
    Ole> function.

    Ole> Unfortunately on the LPC CPUs it seems that the Core Debug
    Ole> registers may not be user programmed which caused NutMicroDelay to
    Ole> freeze the system.

    Ole> Curiously it works if a JTAG Debugger is connected.

    Ole> As long as this function does not work reliable it is disabled by
    Ole> default and the old NutMicroDelay implemetation is used.

    Ole> Use the new config option "NUT_MICRODELAY_CM3_CYCCNT" in the
    RTOS-> TimerManagem section to re-enable it.

Is this really a thing for the configurator or shouldn't the
#if defined(__CORTEX__) && defined(NUT_MICRODELAY_CM3_CYCCNT)
line be a whitelist like
#if defined(MCU_STM32)

Otherwise we pile up tons of configuration options...

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the En-Nut-Discussion mailing list