STM32WB55 Outputting a 40Mhz clock out signal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-22 11:32 AM
I have an IC on a board I'm designing that needs a 40Mhz clock in signal. Due to a variety of design and regulatory requirements, I would like to avoid having an external oscillator and instead use the clock out signal of the STM32WB55 on the board. I have written firmware that can output a 32Mhz signal, but I'm struggling with outputting 40Mhz:
- Labels:
-
Zephyr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-22 12:58 PM - edited ‎2023-09-22 12:59 PM
Hello @kullum
I suggest you to debug step by step the code and track the variation of clock values in every step. Else, I think you should share the full project here to give the opportunity to our community members and experts to find the issue.
Best regards.
II
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-22 1:22 PM
Hi Issamos,
This is the full code. This will do what I expect it to do, set A8 to 32Mhz. What I want it to do, that I don't know how to do, is set it to 40Mhz.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-22 1:44 PM
Than you need to use HSI PLL clock and configure the PLL parameters(M,...) to have a 40MHz SYSCLK.
Best regards.
II
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-22 1:57 PM
How would I do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-22 2:25 PM
To understand how to do a HSI PLL system clock configuration, take a look to this exemple (read carefully the readme page and the main code to understand the configuration). Also, the part 8.2 and 8.2.5 of the RM0434 can give you some details about PLL and how to use it. Finally this exemple also should be helpful.
Best regards.
II
