Questions tagged [embedded]

An embedded system is a computer system designed to perform one or a few dedicated functions, often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts.

Further reading:

1612 questions
183
votes
16 answers

Is C++ suitable for embedded systems?

A common question, here and elsewhere. Is C++ suitable for embedded systems? Microcontrollers? RTOSes? Toasters? Embedded PCs? Is OOP useful on microcontrollers? Does C++ remove the programmer too far from the hardware to be efficient? Should…
Toby Jaffey
  • 28,796
  • 19
  • 96
  • 150
60
votes
9 answers

RTOS for Embedded Systems

I have seen many articles that tell me I should be using RTOS for time management and resource management. My time has not permitted my own research, so I come to chiphacker for advice. I use low resource microcontrollers(MSP430, PIC) and was…
Kortuk
  • 13,362
  • 8
  • 60
  • 85
52
votes
9 answers

Using volatile in embedded C development

I have been reading some articles and Stack Exchange answers about using the volatile keyword to prevent the compiler from applying any optimizations on objects that can change in ways that cannot be determined by the compiler. If I am reading from…
Pryda
  • 1,241
  • 2
  • 19
  • 30
42
votes
4 answers

Why are LEDs on most embedded designs inverted?

I noticed, that on all my evaluation boards that I had up to this point in time. The LEDs were all connected in active low to the Microcontroller Port. I understand that from a safety view it's better to have active low RESET lines and such. But…
anyone
  • 523
  • 4
  • 6
41
votes
3 answers

What resides in the different memory types of a microcontroller?

There are different memory segments to which various types of data are put into from C code after compilation. I.e: .text, .data, .bss, stack and heap. I just want to know where each of these segments would reside in a microcontroller memory. That…
stenvar
  • 731
  • 2
  • 10
  • 17
35
votes
9 answers

What happens when an embedded program finishes?

What happens in an embedded processor when execution reaches that final return statement Does everything just freeze as it is; power consumption etc, with one long eternal NOP in the sky? or are NOPs continuously executed, or will a processor shut…
Toby
  • 825
  • 1
  • 8
  • 16
34
votes
14 answers

What makes the stack concept useful in embedded programming?

Below is an illustration of the stack concept: I have read many times about the stack pointer and how some variables are stored in SRAM on a stack. Many tutorials explain how it works, but not why this concept exist at all. Imagine I am the program…
GNZ
  • 1,559
  • 4
  • 25
  • 52
34
votes
5 answers

What is a JTAG?

I'm pretty new to embedded systems, and I keep seeing this term used all the time, but I can't quite understand what is it. A quick search online yields this Wikipedia page: https://en.wikipedia.org/wiki/Joint_Test_Action_Group which describe it as…
UnTraDe
  • 521
  • 4
  • 8
33
votes
6 answers

Embedded Programming for Beginners: Arduino or Raspberry Pi?

I'm a computer science student and I'm eager to expand my knowledge on embedded programming and electrical engineering. I've read here that using tools like the Arduino microcontroller is a good way to start. I'm primarily a Java and Python…
Matthias Braun
  • 487
  • 1
  • 5
  • 10
25
votes
5 answers

Why are SRAM based FPGA used more than NVM based FPGA?

SRAM based FPGAs need to load the bitstream again after power off. Meanwhile the Non-Volatile based one don't need that. I wonder, why are more experiments and security research done on the SRAM FPGA than the the NVM based one, it seems that the…
Lavender
  • 527
  • 1
  • 5
  • 10
24
votes
7 answers

For embedded code, why should I use "uint_t" types instead of "unsigned int"?

I am writing an application in c for an STM32F105, using gcc. In the past (with simpler projects), I have always defined variables as char, int, unsigned int, and so on. I see that it is common to use the types defined in stdint.h, such as int8_t,…
bitsmack
  • 16,747
  • 9
  • 52
  • 108
24
votes
4 answers

How do you determine how much flash/RAM you need for a microcontroller?

Let's say you are starting an embedded project with some known functionality. When you select a microcontroller how do you select how much RAM you need? Do you use a developer board and code your project first and then see how much memory you have…
efox29
  • 11,827
  • 9
  • 56
  • 102
24
votes
2 answers

Firmware protection on AVR and PIC controllers

Can someone extract the HEX file that I burn in a microcontroller I provide them? If that is possible, how can someone ensure that their code is secured in embedded systems? In the case of PIC and AVR microcontrollers, how can one protect their…
Rookie91
  • 2,108
  • 4
  • 29
  • 46
23
votes
5 answers

When do we need an Operating System in Embedded System Design?

I have written plenty of bare metal code for PIC and x86 processors. Can someone tell me how and when should I need an operating system? Conversely, what application or situation can be dealt with or without an operating system as well?
quantum231
  • 11,218
  • 24
  • 99
  • 192
23
votes
6 answers

How do you structure large embedded projects?

Background: Junior R&D electronics engineer (the only EE in the company) - the hardware and the coding is not the problem. My biggest issue is getting a proper overview of the project, and where to start. So far I've only made minor software…
Sorenp
  • 1,287
  • 8
  • 18
1
2 3
99 100