embedded

How can I use an SD card for logging 16-bit data at 48 ksamples/s?

亡梦爱人 提交于 2019-11-30 11:24:41
Background My board incorporates an STM32 microcontroller with an SD/MMC card on SPI and samples analogue data at 48 ksamples/s. I am using the Keil Real-time Library RTX kernel, and ELM FatFs . I have a high priority task that captures analogue data via DMA in blocks of 40 samples (40 x 16 bit); the data is passed via a queue of length 128 (which constitutes about 107 ms of sample buffering) to a second low priority task that collates sample blocks into a 2560 byte buffer (this being a multiple of both the 512 byte SD sector size and the 40 sample block size). when this buffer is full (32

We have to use C “for performance reasons” [closed]

回眸只為那壹抹淺笑 提交于 2019-11-30 10:36:35
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . In this age of many languages, there seems to be a great language for just about every task and I find myself professionally struggling against a mantra of " nothing but C is fast ", where fast is really intended to mean "fast enough". I work with very rational open-minded people, who like to compare numbers,

How “Real-Time” is Linux 2.6?

我与影子孤独终老i 提交于 2019-11-30 10:29:40
问题 I am looking at moving my product from an RTOS to embedded Linux. I don't have many real-time requirements, and the few RT requirements I have are on the order of 10s of milliseconds. Can someone point me to a reference that will tell me how Real-Time the current version of Linux is? Are there any other gotchas from moving to a commercial RTOS to Linux? 回答1: You can get most of your answers from the Real Time Linux wiki and FAQ What are real-time capabilities of the stock 2.6 linux kernel?

What is the difference between RTOS and Embedded Linux? [closed]

℡╲_俬逩灬. 提交于 2019-11-30 10:21:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . RTOS and Embedded Linux are used for embedded systems programming. Is Embedded Linux itself an RTOS ? Can anyone list the comparison or difference please? 回答1: Linux is a general-purpose OS (GPOS); its application to embedded systems is usually motivated by the availability of device support, file-systems,

Resources for memory management in embedded application

余生颓废 提交于 2019-11-30 09:26:42
How should I manage memory in my mission critical embedded application? I found some articles with google, but couldn't pinpoint a really useful practical guide. The DO-178b forbids dynamic memory allocations, but how will you manage the memory then? Preallocate everything in advance and send a pointer to each function that needs allocation? Allocate it on the stack? Use a global static allocator (but then it's very similar to dynamic allocation)? Answers can be of the form of regular answer, reference to a resource, or reference to good opensource embedded system for example. clarification:

How do I redirect Tornado / VXWorks shell output?

流过昼夜 提交于 2019-11-30 09:22:13
问题 I've been working on an embedded C/C++ project recently using the shell in Tornado 2 as a way of debugging what's going on in our kit. The only problem with this approach is that it's a complicated system and as a result, has a fair bit of output. Tornado 'helpfully' scrolls the window every time some new information arrives which means that if you spot an error, it disappears out of site too quickly to see. Each time you scroll up to look, the system adds more information, so the only way to

Does lwIP support Zeroconf?

妖精的绣舞 提交于 2019-11-30 08:42:36
I see that lwIP has some AutoIP (aka IPv4LL, aka RFC 3927 ) code, but I can't tell if it does anything higher up in the Zeroconf stack, namely mDNS and DNS-SD (with RFC 2782 ). So, does lwIP support DNS-SD service discovery? If not, would it be easy to port code from a project like Avahi that does (assuming licensing allows it)? No, lwIP does not support any part of Zeroconf except AutoIP. I've not looked at Avahi but porting Apples mDNSResponder to lwIP is quite straightforward. There is one bit of nastiness where you have to pull back the pbuf headers to access the IP header to get the

Bursty writes to SD/USB stalling my time-critical apps on embedded Linux

自闭症网瘾萝莉.ら 提交于 2019-11-30 08:41:09
I'm working on an embedded Linux project that interfaces an ARM9 to a hardware video encoder chip, and writes the video out to SD card or USB stick. The software architecture involves a kernel driver that reads data into a pool of buffers, and a userland app that writes the data to a file on the mounted removable device. I am finding that above a certain data rate (around 750kbyte/sec) I start to see the userland video-writing app stalling for maybe half a second, about every 5 seconds. This is enough to cause the kernel driver to run out of buffers - and even if I could increase the number of

Alternative languages for embedded programming

偶尔善良 提交于 2019-11-30 08:19:37
I`m looking for alternatives programming languages (from assembly, C, C++ and basic) to embedded (microcontroller) programming. Is it possible for example, to program microcontrollers in C# or Java? Maybe Ruby or Python? If possible, please post development tools and hardware used. There's also Lua. See eLua . Ira Baxter FORTH has been popular in embedded systems for a long time. I have no specific experience with it but it is very cleverly designed to provide a lot of functionality in a small amount of space even on difficult micro controllers, using threaded code interpretation methods. It

How do you start running the program over again in gdb with 'target remote'?

自古美人都是妖i 提交于 2019-11-30 08:10:26
When you're doing a usual gdb session on an executable file on the same computer, you can give the run command and it will start the program over again. When you're running gdb on an embedded system, as with the command target localhost:3210', how do you start the program over again without quitting and restarting your gdb session? You are looking for Multi-Process Mode for gdbserver and set remote exec-file filename Unfortunately, I don't know of a way to restart the application and still maintain your session. A workaround is to set the PC back to the entry point of your program. You can do