embedded

how to know the Interrupt/GPIO number for a specific pin in linux

有些话、适合烂在心里 提交于 2019-12-02 17:45:46
i'm doing a project in which i need to handle an interrupt in Linux. the board i'm using is an ARM9Board based on the s3c6410 MCU by Samsung (arm 11 processor) and it has the following I/O interface : as the image shows i have EINTx pins for external interrupts and GPxx pins as GPIO pins and i don't mind using any of them but i don't have their numbers ! For EINTx pins : when i call int request_irq(unsigned int irq, void (*handler)(int, struct pt_regs *), unsigned long flags, const char *device); i need the interrupt number to pass it as the first paramter of the function , so how can i get

Write on a mtd block device

岁酱吖の 提交于 2019-12-02 17:45:38
I'm trying to write on a NAND flash memory using MTD block device but I don't understand everything. As I read here mtdblockN is the read only block device N mtdN is the read/write char device N mtdNro is the read only char device N But I'd like to directly write bytes to the partition using a simple write in C and I don't understand how it works (I read somewhre that I first must erase the sectors I want to write on). Which device should I use and how to write on this device? Reading and writing from/to memory technology devices isn't really all that different than any other type of IO, with

What exactly is a dual-issue processor?

三世轮回 提交于 2019-12-02 17:30:40
I came across several references to the concept of a dual issue processor (I hope this even makes sense in a sentence). I can't find any explanation of what exactly dual issue is. Google gives me links to micro-controller specification, but the concept isn't explained anywhere. Here's an example of such reference . Am I looking in the wrong place? A brief paragraph on what it is would be very helpful. Dual issue means that each clock cycle the processor can move two instructions from one stage of the pipeline to another. Where this happens depends on the processor and the company's terminology

What are some ideas for an embedded and/or robotics project?

半城伤御伤魂 提交于 2019-12-02 17:20:58
I'd like to start messing around programming and building something with an Arduino board, but I can't think of any great ideas on what to build. Do you have any suggestions? I show kids, who have never programmed, or done any electronics before, to make a simple 'Phototrope', a light sensitive robot, in about a day. It costs under £30 (GBP) including Arduino, electronics and off-the-shelf mechanics. If folks really get into mobile robots, the initial project can grow and grow (which I feel is part of the fun). There are international robot competitions which require relatively simple

How is the BIOS ROM mapped into address space on PC?

爷,独闯天下 提交于 2019-12-02 17:19:27
The x86 CPU begins execution at physical address 0xFFFFFFF0. There at the end of the address space the BIOS ROM is located. The first instruction the CPU executes from the ROM is far jump which causes the CS segment to be reloaded so the next instruction is executed from within the physical region 0x000F0000 - 0x000FFFFF. What causes the ROM to respond on both regions? Is there some special address decoding logic on PC? I found comment in Bochs source code that states that last 128K of BIOS ROM is mapped to 0xE0000 - 0xFFFFF. However I cannot find more info about this. Clearly this is

Why are C, C++, and LISP so prevalent in embedded devices and robots?

▼魔方 西西 提交于 2019-12-02 17:13:28
It seems that the software language skills most sought for embedded devices and robots are C, C++, and LISP. Why haven't more recent languages made inroads into these applications? For example, Erlang would seem particularly well-suited to robotic applications, since it makes concurrent programming easier and allows hot swapping of code. Python would seem to be useful, if for no other reason than its support of multiple programming paradigms. I'm even surprised that Java hasn't made a foray into general robotic programming. I'm sure one argument would be, "Some newer languages are interpreted,

tslib not creating device

北城以北 提交于 2019-12-02 17:09:27
问题 I am trying to embed tslib on an ARM system, in order to use a touchscreen device ; I already installed it successfully but unfortunately I can't retrieve all my notes to do it again. x) I cross-compiled the libraries files, and I put them into /usr/lib ; I have created the conf file /etc/ts.conf and I have exported the good environment variables : export TSLIB_TSDEVICE="/dev/event2" export TSLIB_CONFFILE="/etc/ts.conf" Here is my problem : tslib doesn't seem to create the event device when I

Alternatives to Lua as an embedded language?

落爺英雄遲暮 提交于 2019-12-02 16:35:38
I am working on an embedded system running Linux on a DSP. Now we want to make some parts of it scriptable and we are looking for a nice embeddable scripting language. These scripts should integrate nicely with our existing C++ code base, be small and fast. I understand that Lua is the industry choice for problems like this. We will probably go with Lua because it is tried-and-true and proven to be stable and so on. However, as a programming language it has some rather quirky corners. So, what alternatives are out there for embeddable languages? EDIT: This is about a year later. We actually

How MMU(Memory management Unit) unit in a processor protects the memory segments

旧城冷巷雨未停 提交于 2019-12-02 16:26:34
While going through one embedded processor architecture, i have seen the block MMU and it is mainly mentioning about the memory protection functionality. May i know , How an MMU does this protection and why it is needed? What is mean by memory protection? What are the other uses of MMU other than protection(like virtual addressing)? Please consider an embedded system without an OS. __Kanu For processors that use memory (most of them) there is a memory interface of some sort, some have names (like amba, axi, wishbone), some do not. From a processors perspective this is address, and data and

What are some refactoring methods to reduce size of compiled code?

ⅰ亾dé卋堺 提交于 2019-12-02 16:24:40
I have a legacy firmware application that requires new functionality. The size of the application was already near the limited flash capacity of the device and the few new functions and variables pushed it over the edge. Turning on compiler optimization does the trick, but the customer is wary of doing so because they have caused failures in the past. So, what are some common things to look for when refactoring C code to produce smaller output? Adam Davis Use generation functions instead of data tables where possible Disable inline functions Turn frequently used macros into functions Reduce