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

"DWT->LAR" not recognized when compiling for STM32F103 #2

Open
v-ivanyshyn opened this issue Aug 22, 2023 · 0 comments
Open

"DWT->LAR" not recognized when compiling for STM32F103 #2

v-ivanyshyn opened this issue Aug 22, 2023 · 0 comments

Comments

@v-ivanyshyn
Copy link

The compiler shows error in the function

void PROFILING_START(const char *profile_name)
{
  prof_name = profile_name;
  event_count = 0;

  CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
  DWT->LAR = 0xC5ACCE55; // <<<<<<<< 'DWT_Type {aka struct <anonymous>}' has no member named 'LAR'
  DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; // enable counter
  //DWT->CYCCNT  = time_start = 0;
  time_start = DWT->CYCCNT;
}

Looking at the core headers, "LAR" field is in "ITM_Type" struct, not in "DWT_Type".
The issue occurs within Platformio IDE using stm32cube framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant