How to change the clock speed of STM32L476RG nucleo board?

STM32F103 Nucleo boards e.g. STM Nucleo F103RB
SHARANYA
Posts: 13
Joined: Fri Aug 18, 2017 8:24 pm

Re: How to change the clock speed of STM32L476RG nucleo board?

Post by SHARANYA » Sun Nov 26, 2017 2:20 pm

I suspected that.Thanks a lot for the reply.Now I scoped and got a speed of 40MHz for each segment of the code!But one thing I would like to ask.
Why the signals are Sinusoidal type in nature?I scoped a signal coming out of a AVR at 2MHz that was perfectly square.Is this happening due to the scope's bandwidth?My scope is Rigol DS1102E which has a 100MHz bandwidth!

User avatar
Pito
Posts: 1743
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: How to change the clock speed of STM32L476RG nucleo board?

Post by Pito » Sun Nov 26, 2017 2:36 pm

Do switch your probe to 1:10.
Pukao Hats Cleaning Services Ltd.

SHARANYA
Posts: 13
Joined: Fri Aug 18, 2017 8:24 pm

Re: How to change the clock speed of STM32L476RG nucleo board?

Post by SHARANYA » Sun Nov 26, 2017 3:20 pm

I am already measuring in 1:10 mode.I also tried with 1:1 mode but everything remains the same!
The max frequency you may see on your oscope is F_CPU/6 (you need 6clocks to toggle once)
But how the speed is 48Mhz here?

User avatar
Pito
Posts: 1743
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: How to change the clock speed of STM32L476RG nucleo board?

Post by Pito » Sun Nov 26, 2017 3:43 pm

I edited my post on FCPU/6..
With a 100MHz BW you cannot expect to see a 48MHz digital signal with great edges.. You would need >300MHz BW to be happy..
Pukao Hats Cleaning Services Ltd.

SHARANYA
Posts: 13
Joined: Fri Aug 18, 2017 8:24 pm

Re: How to change the clock speed of STM32L476RG nucleo board?

Post by SHARANYA » Sun Nov 26, 2017 5:18 pm

Code: Select all

I edited my post on FCPU/6..
I didn't understand!
By the way,thank u a lot for your great feedback...Basically I am building a programmable power supply.The hardware is completed with atmega328p and firmware is written in the Atmel studio using avr-gcc.
Basically I bought this stm32 board a long time ago and didn't use it because of the complexity of the raw ARM programming.I tested some programs on this using keil,HAL & cube.But they were less flexible.I recently found this stm32duino website and thinking to use this board as the main controller instead of the atmega328p in my programmable power supply.

One more problem i am facing in the arduino IDE.Each time I close arduino IDE and reopen it,the settings regarding nucleo board/processor etc are getting vanished.The default board is getting selected as Arduino yun.Also i am unable to find the nucleo64 boards in the list.Then i have to reopen the boards manager and after the boards manager is getting refreshed,the nucleo boards are reappearing in the main boards list!Why is this happening.Pardon me for my silly questions as i am not familiar with Arduino IDE.
All my setting/downloaded files for the stm32 core is saved in the C:\Users\SHARANYA\AppData\Local\Arduino15\packages\STM32 folder by default.

User avatar
Pito
Posts: 1743
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: How to change the clock speed of STM32L476RG nucleo board?

Post by Pito » Sun Nov 26, 2017 6:09 pm

I didn't understand!
STM32F103 chips (Cortex M3, 72MHz one) like BluePill have got 2 wait states while reading from flash memory. It means they do not usually perform 1 instruction per clock.

STM32F4xx chips (Cortex M4) like L476 have got "ART accelerator" - a special 256bit flash cache - which allows to provide "1 instruction per clock" most times.
Adaptive real-time accelerator (ART Accelerator™) allowing 0-wait-state execution from Flash memory
Thus the counting of cycles in F103 and F4xx may differ. That was my point I added to my previous post you have not read.
Pukao Hats Cleaning Services Ltd.

fpiSTM
Posts: 319
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: How to change the clock speed of STM32L476RG nucleo board?

Post by fpiSTM » Mon Nov 27, 2017 5:55 am

SHARANYA wrote:
Sun Nov 26, 2017 5:18 pm
One more problem i am facing in the arduino IDE.Each time I close arduino IDE and reopen it,the settings regarding nucleo board/processor etc are getting vanished.The default board is getting selected as Arduino yun.Also i am unable to find the nucleo64 boards in the list.Then i have to reopen the boards manager and after the boards manager is getting refreshed,the nucleo boards are reappearing in the main boards list!Why is this happening.Pardon me for my silly questions as i am not familiar with Arduino IDE.
All my setting/downloaded files for the stm32 core is saved in the C:\Users\SHARANYA\AppData\Local\Arduino15\packages\STM32 folder by default.
Seems strange. Have you tried to clear the local json file? (C:\Users\SHARANYA\AppData\Local\Arduino15\package_stm_index.json*)
Which Arduino IDE version you used and on which OS?

Post Reply