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?
207 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
- Build issue in my STM32-NUCLEO project using the Eclipse IDE
- STM32 ADC DMA low raw/Voltage readings
- Program doesn't run after DFU
- STM32G030 refuses write to flash
- STM32 - Serial Audio Interface (SAI) - dual data line transmit possible?
- CLion: Debug via St-Link
- STM32 RTC3 Mixed Mode: Writing TR resets SSR
- Ran on an MCU (STM32F1), doubly-linked list code results in a call of HardFault() due to stack overflow
- i want to display voltage of ADC with " ssd1306 OLED " in STM32 when i change the voltage with potentiometer
- spi5 of my STM32MP157F-K2 CAN'T read data from the RC522 CARD
- STM32 unable to be read
- Enabling one timer using another
- Confusion with thumb instructions while compiling recipe for cortexm4 CPU
- How to setup Interface Encoder mode for the STM32F0
- UART Driver for STM32MP25 by EDK2
Related Questions in STM32F4
- Program doesn't run after DFU
- STM32 unable to be read
- Blackpill's adc read error when trying to read an NTC
- STM32 Not recognized by Windows 10
- How to get BVP data from a PulseSensor XD-58C?
- SWO on a Blackpill board
- How to generate two signals with variable frequency and constant phase difference?
- How to compile STM Blackpill code in Keil uVision 5?
- Why the value of DMA_GetCurrDataCounter() does not change, and the program can't run into the interrupt function, as I send some hex number to stm32?
- How to make a proper delay in a microcontroller?
- NUCLEO F429ZI board - Ethernet over usb - zperf example communication issue
- Why my microprocessor stm32f401cb always reads the first adc channel PA0
- Why my led is not responding according to my adc converted potentiometer value?
- Why my microprocessor cannot read analog potentiometer value
- Why my leds does not response to my interrupts
Related Questions in STM32CUBEIDE
- spi5 of my STM32MP157F-K2 CAN'T read data from the RC522 CARD
- Troubleshooting CUBE IDE Compilation Errors
- Using libquickmail to send mails with a GSM modul
- STM32 data transfer via UART
- STM32 SPI slave doesn't read data correctly and transmits incorrect data
- ADC reading in Low Power Mode (Stop Mode) in stm32L431RC Microcontroller
- Interfacing RFID with STM32
- SWO on a Blackpill board
- How do I interface STM32 with the Adafruit BLE SPI Friend module?
- Virtual COM Port with Nucleo F103RB on Windows 11
- The interface firmware FAILED to reset/halt the target MCU
- STM32 MCU works well in debug with breakpoint, but fail in debug mode
- stm32 cubeIDE DMA DAC noise on DAC output
- Why is QT Creator Automatically Splitting my String While Reading the Data from a STM32 Microcontroller?
- ASCII to decimal conversion
Related Questions in PROTEUS
- How to create 2 square waveforms of 50% duty cycle in 8051 with Assembly
- How to transmit and receive data through serial UART port in DOSBox
- Why my leds does not response to my interrupts
- STM32F401xx I2C driver using registers
- PIC18F4580 isn't turning the LED on in Proteus
- Why am I getting this error in proteus: "Invalid opcode 0xFFFF at PC=0x0008"
- Is there an solution to stop looping this
- How to adjust external clock in STM32?
- establishing a connection between atmega2560 and a virtual terminal via USART? I get weird characters on the monitor
- Traffic Light Simulation Issue with Atmega16 Microcontroller
- Debug info gone when changing executable's directory
- In proteus i am not able to find the memory browser as i found in the STM32 IDE
- Character LCD shows nothing in my Proteus project
- Electric Weighing Rain Gauge in Proteus
- STM32 proteus simulation doesn't work properly
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 # Hahtags
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.