未验证 提交 f0895aa4 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #1499 from Guozhanxin/new

to be able debug trace bit  before use DWT.
......@@ -54,6 +54,9 @@ int cortexm_cputime_init(void)
/* check support bit */
if ((DWT->CTRL & (1UL << DWT_CTRL_NOCYCCNT_Pos)) == 0)
{
/* enable trace*/
CoreDebug->DEMCR |= (1UL << CoreDebug_DEMCR_TRCENA_Pos);
/* whether cycle counter not enabled */
if ((DWT->CTRL & (1UL << DWT_CTRL_CYCCNTENA_Pos)) == 0)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册