I want to trigger STM32 using an external clock. That is, I want data to be output from STM32 at every clock pulse. How to configure external clock in STM32 CubeIDE? Information: The card I use is the STM32F401RE card. This card already has an external crystal oscillator feature. But I want to design it using an external clock generator without using this feature.
How to adjust external clock in STM32?
203 Views Asked by SerdarSoylemez At
2
There are 2 best solutions below
0
mcagriaksoy
On
First you need to open your external clock (I assume, you have physically connected your clock to the MCU) There are two types of clocks High Speed and Low Speed.
In the menu, pinout&cofiguration > system core > rcc open the high speed or low speed clock. HSE -> "E" refers for external clock. You need to take of it in clock configuration.
please select:
After opening your clock, you need to select HSE and configure it on your clock configuration page:
Then, you can test the external clock with your oscilloscope and you can verify the MHz you set before.
Related Questions in STM32
- STM32F303VC : device not found
- Very few write cycles in stm32f4
- Put a bootloader program at the bottom of the FLASH memory
- STM32 USB HID reports
- STM32 flashing disabled after flashing a code without R/W protection
- How can I align stack to the end of SRAM?
- STM32 I-CODE and D-CODE buses
- how to use arm-none-eabi-gcc compile STM32 program
- Write a custom bootloader with the STM32L1 series in C
- What are the steps to setup an RTOS application on STM32 using Linux and Makefiles instead of using Windows based IDEs?
- Loosing some bytes on USART transmission with STM32L1XX
- my bootloader doesn't boot my new program on stm32
- Using printf causes error
- Estimating available RAM left with safety margin in C (STM32F4)
- Flashing image to STM3220g-EVAL board using Trace 32
Related Questions in STM32F4
- Writing data to micro SD card from microcontroller STM32F401RET6
- STM32F4 TIM6 interruption doesn't happen while DMA working
- stm32F4 pwm input capture of high frequency signal approx. 2MHz?
- Running Linux 4.9 on Cortex-M4 STM32F4 (29I-DISC1)
- FreeRtos how to store function address while context switching
- SPI MISO value 255
- Hangs in vsprintf()
- stm32F4 7-segment display
- lwip stm32 - http requests failing
- Function HMAC_MD5 : Return succes but no value
- Nucleo F401RE - Interrupt not working
- How to handle input from multiple buttons using one interrupt?
- FSMC gived hard fault handler on STM32F4
- Linking a Static Library built with arm-none-eabi- in Keil uVision Project
- stm32f4discovery A/D set up
Related Questions in STM32CUBEIDE
- STM32F4 ADC Multimode with Master being triggered by timer
- Why are there 2 generated linker scripts by STM32CubeIDE?
- Came up with an "Unable to stat debugging" error when Debug program for STM32 NUCLEOF103RB
- STM32F4 Uart data forwarding uses DMA and packet loss occurs
- STM32 controller hangs when USB is not connected
- STM32 Flash Erase Fails with "Programming Size Error" and "Programming Alignment Error"
- STMCubeIDE how to change the order of the includes
- what is pData in HAL_IM_IC_START_DMA?
- Extremely Simple Program Won't Compile
- Converting u8_t to JSON and manipulate data, in C
- Creating an Array and filling it with ADC values - STM32L476G
- write to SDRAM in STM32f7xxx
- cubeIDE (eclips) project importer not working
- How to create an interrupt divider using a DMAMUX on STM32 MCUs
- There was a problem during the compilation process of my STM32 Project
Related Questions in PROTEUS
- Simulating PSoC 5LP
- How to control a Dual 7 Segment Display in Arduino + Protues
- Traffic Light Simulation Issue with Atmega16 Microcontroller
- establishing a connection between atmega2560 and a virtual terminal via USART? I get weird characters on the monitor
- How to adjust external clock in STM32?
- Why am I getting this error in proteus: "Invalid opcode 0xFFFF at PC=0x0008"
- Is there an solution to stop looping this
- PIC18F4580 isn't turning the LED on in Proteus
- STM32F401xx I2C driver using registers
- Symbol "$MKRORIGIN" used but not found in libraries
- Controller received data whilst busy
- Detect peak value from real time data in an array
- How to store in ACSR and ADCSRA/B (AVR)
- Proteus always error at certain time (in this case 1.75 sec)
- PWM output always 0 on proteus (using atmega328p and assembly on microchip studio to write the code)
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?



That's not how clocks work. Clocks set the processing speed for your mcu, not the rate at which you push data. And the sysclock has to be several times faster than the rate at which you want to push data to accomodate for calculation time.
The proper way to do this is to configure your clock like you would any normal clock (either external or internal) and set the "external clock" as an interrupt on one of the interrupt-enabled I/Os. Now your CPU can sleep and do nothing while waiting for your trigger and instantly jump into action sending your data as soon as the trigger hits.