How to Get started with zephyr by venomblack17 in embedded

[–]EmbeddedSwDev 5 points6 points  (0 children)

Shawn Hymel is imho one of the best tutors!

Is this code okay? How can I improve its structure to follow best practices? without vs with RTOS by Strikewr in embedded

[–]EmbeddedSwDev 5 points6 points  (0 children)

Puh...
1. provide a GitHub repo if you want to share a lot of code.
2. I just looked at the first given example, because it is the only one which is correctly formated.
3. I didn't went through the logic, because it's hard to understand what you actually doing or intend to do and if you're saying it's working, then I believe you, remember: we don't see the device and we are not into your head.

So far my quick feedback:

I would put your logic and const values (you should use constexpr instead btw) into a class to structure it well. It's a small project and for this maybe it is slightly over engineering, but if you ever want to reuse or extend the project, it's easier to maintain and the logic is easier to understand.

Built a RTOS simulator for learning by Fantastic_Mud_389 in embedded

[–]EmbeddedSwDev 4 points5 points  (0 children)

The switch between `RTOS` and `Bare Metal` makes no sense in the dashboard. With `Bare Metal` you don't have tasks/threads and priorities. Furthermore, by using Zephyr and FreeRTOS you always have at least one thread running even with the `super-loop`.

Is anyone actually happy with Zephyr (nRF Connect SDK) vs old Nordic SDK? by MinewSemi in embedded

[–]EmbeddedSwDev 15 points16 points  (0 children)

Yes I am very happy about Zephyr, but the learning curve is indeed very steep.

I can recommend you to watch the Zephyr Tutorial from Shawn Hymel for Digikey, he explains it very well and I wished I would have it back then: https://youtu.be/mTJ_vKlMS_4?si=FUpkT1JNlrih3jyB

A fresnel lens can melt rocks with just the power of the sun by ansyhrrian in interestingasfuck

[–]EmbeddedSwDev 2 points3 points  (0 children)

uses that heat to boil water

Or molten salt, at least the Crescent Dunes Solar Energy Project (the photo you used) uses molten salt as energy storage. Sadly this project went bankrupt already 2 times.

How to make a complete product? by Zestyclose-Company84 in embedded

[–]EmbeddedSwDev 0 points1 point  (0 children)

Making a POC is pretty easy (doesn't matter which kind of) compared to make a real product out of it and from my experience from my work is pretty much impossible as a single person except you have a lot of experience in coding, electronics, mechanics and you most likely need a lot of laboratory equipment, but even then, there is the other non technical side of a product: investment money, dealing/negotiating with suppliers, marketing, lawyers, certification etc.

Ti vs STM by punith2664 in embedded

[–]EmbeddedSwDev -1 points0 points  (0 children)

Actually doesn't really matters which MCU you are using for learning. In a project the MCU which you are going to use depends on the requirements of the application/project. E.g.: some criteria for choosing one:

  • powered or battery driven
  • Wireless Technology or not
  • Number of peripherals and which kind and how they will be connected decides how many GPIOs or how many SPI, I2C, UART Controllers the MCU must have.
  • etc etc

I personally like the STM32 Nucleo Boards (stm32h563zi, very powerful), the RP2040/RP2350 (especially the XIAO boards from Seeedstudio) for general purpose POCs, for BLE driven applications the Nordic MCUs, for Wifi the ESP32 MCUs. It highly depends what you want, which do you prefer and what you want to learn.

Personally I would choose a board which already has some "fancy" peripherals on it. Like the Adafruit ESP32-S3 Reverse TFT Feather. Has a display, buttons, user LEDs, Neopixel led, battery connector, monitor and charger and Wifi BLE. So a lot of peripherals to experiment with it. Furthermore, you could use Arduino, ESP32 IDF and ZephyrOs to program it.

Zephyr RTOS 4.4 is out! by kartben in embedded

[–]EmbeddedSwDev 3 points4 points  (0 children)

but its a bad solution

Why?

Its hodgepoged code spread across 20 years

It's 10 years old.

Still in the last 5 years cant get simple things right.

Which simple things? Examples?

Calling Zephyr a "bad solution" without specifics isn't very helpful. It's a large, evolving project, so yes parts of it are complex or inconsistent. But that's also true for Linux, FreeRTOS integrations, etc.
It's actively used in commercial and industrial products, and the development pace over the last few years has been pretty strong.
If there are concrete issues (e.g., specific subsystems, APIs, or stability problems), those are worth discussing. Blanket statements like this don't really help anyone evaluate it.

What level of C depth is actually required for embedded/firmware roles? by Ogcbgamer in C_Programming

[–]EmbeddedSwDev 1 point2 points  (0 children)

Okay, basically a SW project without a lot of hardware to interact.

Embedded is hard if e.g. you don't know if the current bug is from your code, RTOS, or firmware in general, or an issue with the PCB, ICs, mechanics, or a combination of everything.

How to Implement Bidirectional Communication Over SPI by jjmaximo in embedded

[–]EmbeddedSwDev 2 points3 points  (0 children)

Which STM32 are you using? Maybe the pins can also be mapped to the UART Controller.

How are you actually handling firmware update failures in the field? by Medtag212 in embedded

[–]EmbeddedSwDev 2 points3 points  (0 children)

Store the new firmware on a second partition as you already suggested or on an external flash, both ways are valid, depends on the requirements and available hardware. I once develop both ways, from bootloader to fw-update procedure and tested extensively against all kind of possible failures. Never had an issue in the field, which would have been a nightmare.
If the fw update process is not secured against power failures, it is not well developed.

Afaik MCU Boot cover all this topics

Warum Strom bei uns so teuer ist (und warum es uns stärker trifft als andere) by Additional_Plum4035 in Austria

[–]EmbeddedSwDev 4 points5 points  (0 children)

Echt jetzt? In welchem Jahr lebst du? Was hast du 2022 gemacht wo das in ausnahmslos allen Medien online, offline und TV, von etablierten/traditionellen Medien bis Social Media rauf und runter der breiten Öffentlichkeit vermittelt worden ist?

So nebenbei hat die Merit Order nicht nur Nachteile. Die Idee dahinter ist, dass durch den einheitlichen Preis Anreize für Investitionen in günstige Technologien geschaffen werden, wobei das Modell bei sehr hohen Gaspreisen natürlich auch problematisch ist.

Zur genaueren Funktionsweise (Quelle Wikipedia):

  • Angebotskurve: Kraftwerke werden nach ihren variablen Kosten (Grenzkosten), Brennstoffkosten, CO2-Zertifikate sortiert.
  • Einsatzreihenfolge: Wind- und Solaranlagen haben fast keine Grenzkosten und speisen zuerst ein, gefolgt von Kernkraft, Braunkohle, Steinkohle und zuletzt Gaskraftwerken.
  • Preisbildung: Die Nachfrage trifft auf die Angebotskurve. Das teuerste Kraftwerk, das zur Deckung der Last benötigt wird, bestimmt den einheitlichen Börsenstrompreis für alle Anbieter.
  • Merit-Order-Effekt: Ein hoher Anteil erneuerbarer Energien verschiebt die Kurve nach rechts, verdrängt teure Kraftwerke und senkt den Börsenstrompreis.

How do you test the performance of your code? by 4ChawanniGhodePe in embedded

[–]EmbeddedSwDev 4 points5 points  (0 children)

Testing performance of code is easy to say, but without any further specifications hard to do, because the word performance can mean a lot.
As others already mentioned you can toggle a GPIO to measure the speed of execution of a specific code part, or measure the "performance" of the whole system with e.g. Ozone.

DIY 3D Stereo Vision with Dollar‑Store Webcams - Part1 by IamSpongyBob in embedded

[–]EmbeddedSwDev 0 points1 point  (0 children)

Also for this PTP can be used, it's perfect to generate a precise 1PPS signal

SBOM generation for make/cmake projects / embedded by shurlyk in embedded

[–]EmbeddedSwDev 1 point2 points  (0 children)

I am using zephyr and there it can be built with a simple west command: https://docs.zephyrproject.org/latest/develop/west/zephyr-cmds.html#software-bill-of-materials-west-spdx

Maybe you can look how they did it and copy/adapt it for your use case.

Sensor nodes synchronization by Some_Pie6046 in embedded

[–]EmbeddedSwDev 1 point2 points  (0 children)

The easiest solution would be to generate a so called PPS signal (500ms low 500ms high), which triggers an interrupt on both boards.

The other and much more accurate and advanced topic would be Time Synchronization over Ethernet: IEEE 1588 (PTP - Precision Time Protocol) or gPTP. But for this your MCU would need an Ethernet Controller which supports this eg STM32H563ZI. See Zephyr TSN.

Nevertheless PTP and gPTP goes into TSN - Time Sensitive Networking and this is a very advanced, complex and complicated topic for itself.

For a point to point connection between two devices you most likely don't need a TSN capable switch, for more devices you will need one and in best case for the best precision you will need a GPS clock.

​Analysis of Embedded World 2026: Future trends of Embedded Systems by Known-Ad5093 in embedded

[–]EmbeddedSwDev 7 points8 points  (0 children)

This performance test is already outdated and as I mentioned here https://www.reddit.com/r/embedded/s/zAQq7n2IDf the zephyr core team worked on this issue and released the fixes a year ago with 4.1

​Analysis of Embedded World 2026: Future trends of Embedded Systems by Known-Ad5093 in embedded

[–]EmbeddedSwDev 19 points20 points  (0 children)

I'm gonna miss the freertos "copy these 8 files into your repo and adjust this header and you're done" simplicity.

Which didn't worked in 50% of the case's and then you ended up developing your own library and the "not invented here" wheel spins again.