ITM tracing for SAMV71Q21B

Comments

1 comment

  • Avatar
    Jon Elliott

    SWO tracing is not supported by the CrossConnect Classic.

    It is however supported by the CrossConnect Neo and SEGGER J-Link debug interfaces.

    Using the current CrossWorks for ARM 5.0.2 release, I've just done the following to enable SWO tracing using these debug interfaces:

    1. Modified the EnableTrace() function in the SAM_V_Target.js target script to be:

    function EnableTrace(traceInterfaceType)
    {
    var PMC_SCER_ADDR = 0x400E0600;
    var PMC_PCK3_ADDR = 0x400E064C;
    var PMC_WPMR_ADDR = 0x400E06E4;

    // Disable PMC write protection
    TargetInterface.pokeWord(PMC_WPMR_ADDR, 0x504D4300);

    // Set ETM clock (PCK3) to 10MHz (MCK / 15)
    TargetInterface.pokeWord(PMC_PCK3_ADDR, 0xE4);

    // Enable ETM clock (PCK3)
    TargetInterface.pokeWord(PMC_SCER_ADDR, 1 << 11);
    }

    2. Set the Debug > Target Trace > Trace Clock Speed project property to 10000000Hz

    3. Set the Debug > Target Trace > Trace Interface Type project property to SWO

    0
    Comment actions Permalink

Please sign in to leave a comment.