How can I blink 2 Leds at the same time i.e. one at 500ms and the other at 1sec exact time on nrf52840 using Seger embedded as ide. I tried to delay it using the inbuilt delay function but it just halts the processor and can't find the exact answer. I tried the examples on the Seger embedded but I can't find the solution I am beginner so, don't so I don't have that much idea about it. It would be very helpful mentioned to learn mor stuffs on it. Thank you!
Blink LED on segger embedded studio
93 Views Asked by test email At
1
There are 1 best solutions below
Related Questions in EMBEDDED
- MSP430F5529 on the MSPEXP430F5529LP: UART is not actually transmitting despite seemingly correct setup. What is wrong?
- A FPGA Project Proposal where I can use both PS and PL
- Program doesn't run after DFU
- Sending struct through queue
- How to generate a VPI warpmap for polynomial distortion correction?
- How to present this example concept in UML: Using 2 LCD displays in C/C++
- CLion: Debug via St-Link
- Portenta H7 Baremetal Development and a Little Guidance on Embedded System Learning Roadmap
- STM32 RTC3 Mixed Mode: Writing TR resets SSR
- Unable to read value from gpio set as input
- Mbed TLS: in-place en-/decryption for OAEP doesn't seem to work
- Shared variable read from low priority thread in preemptive scheduling
- Own Pattern / framework for interfacing with components in C
- Performance Difference Between Global Variable and Local Variable in Embedded Systems
- Comparing analog signal from Electret mic with samples
Related Questions in EMBEDDED-RESOURCE
- Cannot find path specified when trying to add existing embedded resource in Visual Studio 2022
- Add icon on a Golang program using webview/webview_go
- How to access dfm resource at runtime (Delphi 11, 12)
- Microsoft Visual Studio 2022 C# Programmatically Change or Evaluate a resource file Build Action value
- Data pointer from LockResource() is not the expected VS_VERSION_INFO structure
- Why does Linux fail to map this PT_LOAD ELF segment?
- How to read data embedded into the program's own ELF?
- Is this code from STM32 FATFS User manual (um1721 ) correct?
- Should interrupts be disabled while communicating with external SPI flash?
- Instagram poste embedding not working properly
- MauiFont not imported in net7.0-windows10.0.19041.0 project
- Copy Resource File to Directory - VSTO - VB.NET
- Embed Preference Form into a Web - Privacy Center
- VC linker error - CVT1100 duplicate resource. type:MESSAGETABLE
- C# .NET6 referencing embedded .ico file fails in debugging in VS
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?
There are many ways you could do that some more sophisticated than others involving hardware timers, interrupts etc.
However in general, with the little information you have provided and in "pseudocode", a simple solution is to use a much shorter delay and count the number of "ticks" and toggle each LED when it is time to do so:
That is quite generalised. For your very specific requirements you could simplify that:
If you want to perform other processing whilst flashing the LED and you are not using an RTOS, then you probably don't want a delay at all. Instead you would simply poll an available clock source: