cancel
Showing results for 
Search instead for 
Did you mean: 

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

Vkris.1
Associate II
 
6 REPLIES 6

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Vkris.1
Associate II

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

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

Vkris.1
Associate II

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

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
Up vote any posts that you find helpful, it shows what's working..
Manny
Associate III

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?