Activity for Lundinâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #287400 |
@#36396 Well in case of .data/.bss initialization, the compiler by default has to perform it because it claimed to be C standard compliant. Regardless if the user asked for it or not. And so they end up with a solution which is standard compliant but unlikely to be of use to any single user. Or in ca... (more) |
— | over 2 years ago |
Comment | Post #287400 |
On classic microcontrollers you can often just "hack" the CRT by replacing the reset vector with a custom one, execute all critical code, then call the CRT and let it do its thing, and then the CRT eventually calls main(). (more) |
— | over 2 years ago |
Comment | Post #287400 |
@#36396 Yeah sure but the normal use is: you wish to use the watchdog, you wish to use the clock quartz which you provided, you wish to enable LVD/brownout detect, you wish to set GPIO port directions and pull resistors etc etc. I once wrote a summary on how to do this correctly here: https://stackov... (more) |
— | over 2 years ago |
Comment | Post #287400 |
In case of mid- to high-end MCUs that provide data cache, the `.data`/`.bss` initialization will get carried out much faster if done by the CRT than if done by individual application modules. This is simply because the MCU can utilize the cache much more efficiently if chewing to through a chunk of c... (more) |
— | over 2 years ago |
Comment | Post #287400 |
It should be noted that in case of C++, default constructors of objects with static storage duration will also get called by the CRT, adding even more execution time to start-up. C++ has very intricate rules for initialization, especially past C++11, so the standard compliant start-up time in C++ mig... (more) |
— | over 2 years ago |
Edit | Post #287400 | Initial revision | — | over 2 years ago |
Answer | — |
A: How to perform initialization of static storage variables in embedded systems? Things happening/things we want to happen before main() is called: The code executed before `main()` is often referred to as "the C runtime (CRT)" or just "start-up code". This code is typically provided by the microcontroller-specific libraries and among other things, it initializes `.data` and `... (more) |
— | over 2 years ago |
Edit | Post #287398 | Initial revision | — | over 2 years ago |
Question | — |
How to perform initialization of static storage variables in embedded systems? Whenever declaring a variable in C outside a function at file scope or when specifying it as `static`, it gets assigned a life time known as static storage duration. Meaning it will be accessible throughout the whole execution of the program. Such variables are typically allocated in one of two R... (more) |
— | over 2 years ago |
Comment | Post #287359 |
Maybe we could do a list which is posted by one user but other trusted users can "sign up" as co-authors and only those approved are allowed to edit it? Then we can protect it from too many exotic additions. With the original author having the final say (and the possibility to carry out edit rollback... (more) |
— | over 2 years ago |
Edit | Post #287354 | Initial revision | — | over 2 years ago |
Answer | — |
A: A community-maintained list of abbreviations used in electrical engineering? I support this idea and think that it might fit the Papers category, although it should be allowed to have multiple users maintain and moderate it. It should be a brief glossary for a quick look-up of technical terms. Perhaps use a single word as "defining category", as seen in a dictionary and ca... (more) |
— | over 2 years ago |
Edit | Post #287353 | Initial revision | — | over 2 years ago |
Question | — |
A community-maintained list of abbreviations used in electrical engineering? At Somewhere Else, we started an initiative to make a community-maintained list of abbreviations used in electrical engineering: What are abbreviations used in electrical engineering? I think it could be a valuable thing to have, although the mentioned list suffered from Q&A style and too many co... (more) |
— | over 2 years ago |
Edit | Post #286136 |
Post edited: |
— | over 2 years ago |
Comment | Post #286964 |
Well, some hobbyist or school project is naturally a different story than professional electronics development. In general it is always nice to check what multiple vendors can offer. Some even have integrated MCU/RFIC in the same chip. (more) |
— | over 2 years ago |
Edit | Post #286964 |
Post edited: |
— | over 2 years ago |
Edit | Post #286964 | Initial revision | — | over 2 years ago |
Answer | — |
A: Power amplifier for remote controller #1 before anything else is to do your homework. The Nordic semi web site says: "nRF24 Series Not recommended for new designs". That means forget about using this part! They are phasing it out of production and it will probably go EOL within a couple of years. Also be careful not to use some silicon v... (more) |
— | over 2 years ago |
Edit | Post #286121 |
Post edited: |
— | over 2 years ago |
Edit | Post #286121 |
Post edited: |
— | over 2 years ago |
Comment | Post #286672 |
Indeed this doesn't really give a proper current loop unless Vdd is a current generator. But I had already delivered the system when the customer changed their mind completely. So we ended up doing a quick & dirty solution just converting voltage to current over a resistor, since the PLC was located ... (more) |
— | over 2 years ago |
Edit | Post #286615 | Initial revision | — | almost 3 years ago |
Answer | — |
A: Mysterious little cases hanging on street wirings in India Based on this nerdy but seemingly trustworthy site: https://www.prc68.com/I/TelephonePoles.shtml Then I would guess these are cable TV repeaters/signal amplifiers. Classic cable TV uses copper coaxial wire, modern versions will use fibre. To deal with voltage/signal loss over distances, you n... (more) |
— | almost 3 years ago |
Comment | Post #286595 |
The main problem that I'm having is that one direction of the semi-duplex transmission works worse than the other, for which there could be many reasons. In case the impedance turns weird, then I'd get standing wave phenomenon which might explain the loss of signal currently experienced. But as you s... (more) |
— | almost 3 years ago |
Comment | Post #286595 |
Thanks for your reply. A bit more background info: this system was actually delivered some ten years ago and has been working somewhat ok given the tough environment and the questionable installation. Everything electrical is built into a large, proof cabinet with air condition temperature control. H... (more) |
— | almost 3 years ago |
Edit | Post #286594 | Initial revision | — | almost 3 years ago |
Question | — |
What effect will extreme temperatures have on characteristic impedance of a wire? My scenario is this: radio equipment controlling an overhead crane inside a steel mill. Specifically it is used for transporting melting pots. With the current, unfortunate installation, the antenna and antenna coax cable are sitting exposed just above the melting pot where it can get many hundred de... (more) |
— | almost 3 years ago |
Edit | Post #286535 |
Post edited: |
— | almost 3 years ago |
Edit | Post #286492 |
Post edited: Spelling |
— | almost 3 years ago |
Comment | Post #286434 |
First of all, this is a simplified schematic of a voltage clamp IC SN47TVC3306, so it doesn't likely contain the whole story. I believe the double lines means these are so-called "pass transistors". https://en.wikipedia.org/wiki/Pass_transistor_logic. Basically for a voltage clamp to make sense there... (more) |
— | almost 3 years ago |
Comment | Post #286314 |
Either PLCs handle the current measurement internally or they require an external resistor. That's a specific and very narrow question. Most of my experience from PLC-like computers come from automotive ECUs in heavy machinery and they typically don't use external resistors, but then 4-20mA isn't nea... (more) |
— | almost 3 years ago |
Edit | Post #286312 | Initial revision | — | almost 3 years ago |
Question | — |
How do PLCs normally measure 4-20mA current loops? I'm looking for input from anyone with insight in the PLC world. How do PLCs usually measure 4-20mA current loops? I would assume it's one of these two alternatives: - Through an external "shunt" resistor - Through internal current sense electronics My scenario is an industrial system whe... (more) |
— | almost 3 years ago |
Edit | Post #286121 |
Post edited: |
— | almost 3 years ago |
Comment | Post #286179 |
Picking a MCU which can DMA the ADC reads might be a good idea. Modern ADC can easily sample > 1 MHz, the bottleneck is that without DMA, the CPU has to be fast enough to respond to that sample rate. Building such with old school interrupts is cumbersome, especially when the CPU has a lot of other th... (more) |
— | almost 3 years ago |
Edit | Post #286133 |
Post edited: |
— | about 3 years ago |
Edit | Post #286136 | Initial revision | — | about 3 years ago |
Answer | — |
A: Oscilloscope potentially ESD striked The usual culprits would rather be the ground clip itself or accidentally shorting something with it, more so than ESD. And if something has actually broken on the scope, I'd suspect the probe to be broken before anything else. First try to calibrate the probe by hooking the ground clip to the me... (more) |
— | about 3 years ago |
Edit | Post #286122 |
Post edited: |
— | about 3 years ago |
Edit | Post #286122 | Initial revision | — | about 3 years ago |
Question | — |
Code formatting appears to be broken I posted a post containing C code in the Papers category here, using the ` ```c` formatting which works elsewhere on Codidact. The code does not get formatted with color coding, though it gets fixed width (courier font). This community needs to have code formatting enabled just like Software Devel... (more) |
— | about 3 years ago |
Edit | Post #286121 |
Post edited: |
— | about 3 years ago |
Edit | Post #286121 |
Post edited: |
— | about 3 years ago |
Edit | Post #286121 | Initial revision | — | about 3 years ago |
Article | — |
Why should I not use dynamic memory allocation in embedded systems? I keep hearing that dynamic memory allocation on the so-called "heap" segment should not be used in microcontroller-based embedded systems. Pretty much every safety standard like for example MISRA C bans the use of it. And I don't only hear this in the context of safety-related applications, but it s... (more) |
— | about 3 years ago |
Comment | Post #286049 |
Since this is an electrical engineering site, questions regarding the design of a power supply are on-topic, questions regarding where to find/buy one are not. (more) |
— | about 3 years ago |
Comment | Post #286035 |
PCB inside a metal enclosure, either aluminium or stainless steel. Enclosure grounded to chassis, antenna connector like BNC or TNC also grounded. The enclosure partially serves as ground plane for a 1/2 wave antenna. (more) |
— | about 3 years ago |
Comment | Post #286035 |
This particular product is for an industrial/automotive application so telling someone to wear ESD protection is simply not going to work. The product isn't allowed to break from ESD or it will piss off the customers, regardless what's written down in terms of warrenty. And regardless, suppose there ... (more) |
— | about 3 years ago |
Comment | Post #285889 |
@#53110 Or, since this has been discussed multiple times and always without concensus, there's no reason to believe that it will get consensus this time either. (more) |
— | about 3 years ago |