STM32 Adventures – output clock to pin


When working with STM32 using registries only it is important that you have REFERENCE MANUAL and DATASHEET available. We will use them a lot 🙂


 

In today’s post we will be outputting SYSCLK to external pin of our STM32F407 discovery board. As mentioned we dive into our RM and find part responsible for RCC configurations. From there it is easy to see which bits we need to output SYSCLK to our pin.

stm32_clockoutput_01

 

As you can see on the above reset value shows that desired SYSCLK and default no prescaler will be selected. Then in this instance let’s find out on which pin we have to enable our alternate function.

To do this we need to find it in DS.

stm32_clockoutput_02

 

Great – it is default system function! So the only thing we should do is just set this PIN as output

 

let’s see it if works by looking into our logic level analyzer

stm32_clockoutput_03

 

We will defenitely be able to use this functionality in interacting with external hardware – but thats for future posts

Leave a Reply

Your email address will not be published. Required fields are marked *