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

st-trace: Synchronization issue #1251

Closed
simplerobot opened this issue May 22, 2022 Discussed in #1248 · 1 comment · Fixed by #1252
Closed

st-trace: Synchronization issue #1251

simplerobot opened this issue May 22, 2022 Discussed in #1248 · 1 comment · Fixed by #1252

Comments

@simplerobot
Copy link
Collaborator

simplerobot commented May 22, 2022

Discussed in #1248

st-trace's --clock parameter sets the system clock speed in a whole number of MHz. This can result in communication errors when using fractional MHz clock frequencies. We should allow setting the system clock frequency and trace frequency exactly using a common format.

I suggest we expect values provided with the "--clock" and "--trace" arguments to require a suffix of "Hz", "KHz", "MHz", or "GHz". If no suffix is provided we should continue to use a MHz default for "--clock" and a Hz default for "--trace" to maintain backward compatibility, but should display a warning message. We should also support fractional values, such as "7.384620MHz".

While digging into this issue, I also found the following related issues:

  • There is a cosmetic bug that reads the TPI prescaler from the wrong register, causing us to print out the wrong clock speed configuration on startup.
  • The STM32 chips appear to support a maximum trace speed of 1/5 of the system clock. There should be an error if the trace speed is set above this.

I'm happy to fix these. Does anyone have input on the format to specify clock frequencies?

Thanks,
John

@simplerobot
Copy link
Collaborator Author

Sorry, this is a dup of #1252 where I submitted a potential fix for these issues.

@Nightwalker-87 Nightwalker-87 linked a pull request Jun 4, 2022 that will close this issue
@Nightwalker-87 Nightwalker-87 added this to the v1.7.1 milestone Jun 4, 2022
@Nightwalker-87 Nightwalker-87 changed the title st-trace synchronization issue [st-trace] Synchronization issue Jul 14, 2022
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Jul 14, 2022
@Nightwalker-87 Nightwalker-87 changed the title [st-trace] Synchronization issue st-trace: Synchronization issue Jul 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants