AnsweredAssumed Answered

Best way to generate a fast square wave on PD2

Question asked by Chris Rice on May 31, 2018
Latest reply on May 31, 2018 by Chris Rice

Hello, first of all pardon my ignorance, I'm a little new to STM32 development.  We are working on a project on an STM32F769, and my EE has asked me to generate a fairly fast (20mhz) clock output on a specific pin (PD2).  None of the "alternate functions"  of this pin relate to a timer (e.g., some examples route a PWM out of a certain GPIO via alternate function), so I think that means I need to handle an interrupt and toggle the output, right?  Or is there another way to route a signal out a specific GPIO via hardware?

 

If/when i handle it in software (handle the timer interrupt and toggle the output), it's so fast that I'm afraid I'm going to load my CPU.  Are there any best practices out there to avoid this?  

 

Thanks for any advice.

 

 

 

Outcomes