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

STM32H7 RCC clock output configuration not working #852

Closed
chris-durand opened this issue Apr 29, 2022 · 0 comments · Fixed by #853
Closed

STM32H7 RCC clock output configuration not working #852

chris-durand opened this issue Apr 29, 2022 · 0 comments · Fixed by #853
Assignees
Labels
Milestone

Comments

@chris-durand
Copy link
Member

The RCC driver has the following code:

%% if target.family in ["f2", "f4", "f7", "h7"]
	static inline bool
	enableClockOutput1(ClockOutput1Source src, uint8_t div)
	{
		uint32_t tmp = RCC->CFGR & ~(RCC_CFGR_MCO1 | RCC_CFGR_MCO1PRE);
		if (div > 1) tmp |= (div + 2) << 24;
		RCC->CFGR = tmp | uint32_t(src);
		return true;
	}

The prescaler calculation does not match the device registers:
mco

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

Successfully merging a pull request may close this issue.

1 participant