Skip to main content
Vkris.1
Associate II
October 6, 2021
Question

How to generate 25mhz pulse signal from nucleo-64l476rg

  • October 6, 2021
  • 6 replies
  • 1803 views

..

This topic has been closed for replies.

6 replies

Tesla DeLorean
Guru
October 6, 2021

Perhaps by running at 75 MHz and dividing that by three, using TIM or MCO​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Vkris.1
Vkris.1Author
Associate II
October 6, 2021

in have to generate this 25Mhz from GPIO of it

i was using this formula to calculate the timing parameters:

(PSC+1)*(ARR+1) = TIMclk/requirefrequency

is it correct

S.Ma
Principal
October 6, 2021

Get a fast timer without prescaler and either 100 or 75 mhz timer, use output compare pin to generate your pulse(s).

Vkris.1
Vkris.1Author
Associate II
October 7, 2021

first i was trying to generate 1mhz from 80mhz

max i was getting only 110 khz

i was using nucleo-64 l476rg timer 1

when i use prescaler as 0 and pulse as 40 i was getting 613.5 hz

when i use prescaler as 0 and pulse as 400 i was getting 100.613 khz

if there is any sample code available that would be great help

Tesla DeLorean
Guru
October 7, 2021

HAL/CubeL4 should be full of examples.

​

Y​out can't interrupt at these rates, the TIM should be related to the GPIO used, and should Toggle or PWM the pin directly, not via software

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Manny
Associate II
October 7, 2021

How are you using your timer, PWM mode or using it to generate an interrupt that toggle the pin? Can you show the code you are using?