Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge DWT counter offsets into TraceConfiguration #117

Open
tmplt opened this issue Jan 15, 2022 · 0 comments
Open

Merge DWT counter offsets into TraceConfiguration #117

tmplt opened this issue Jan 15, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@tmplt
Copy link
Member

tmplt commented Jan 15, 2022

That is

        cortex_m_rtic_trace::configure(
            &mut ctx.core.DCB,
            &mut ctx.core.TPIU,
            &mut ctx.core.DWT,
            &mut ctx.core.ITM,
            1, // task enter DWT comparator ID
            2, // task exit DWT comparator ID
            &TraceConfiguration {
                delta_timestamps: LocalTimestampOptions::Enabled,
                absolute_timestamps: GlobalTimestampOptions::Disabled,
                timestamp_clk_src: TimestampClkSrc::AsyncTPIU,
                tpiu_freq: freq,    // Hz
                tpiu_baud: 38400, // B/s
                protocol: TraceProtocol::AsyncSWONRZ,
            },
        )
        .unwrap();

into

        cortex_m_rtic_trace::configure(
            &mut ctx.core.DCB,
            &mut ctx.core.TPIU,
            &mut ctx.core.DWT,
            &mut ctx.core.ITM,
            &TraceConfiguration {
                comps: Comparators { enter: 1, exit: 2 },
                delta_timestamps: LocalTimestampOptions::Enabled,
                absolute_timestamps: GlobalTimestampOptions::Disabled,
                timestamp_clk_src: TimestampClkSrc::AsyncTPIU,
                tpiu_freq: freq,    // Hz
                tpiu_baud: 38400, // B/s
                protocol: TraceProtocol::AsyncSWONRZ,
            },
        )
        .unwrap();
@tmplt tmplt added the enhancement New feature or request label Jan 15, 2022
@tmplt tmplt added this to the v0.4.0 milestone Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant