embedded

Acoustic Echo Cancellation (AEC) in embedded software

主宰稳场 提交于 2019-12-09 07:53:38
问题 I am doing a VoIP project on embedded device. I have built a sample using a 32bits MCU with a low grade audio codec. Now I found that there is echo issue on my device, that is I can hear what I said from the speaker. I have do some research and found that most appliaction use a DSP codec with acoustic echo cancellation feature. However, is it possible that I do the acoustic echo cancellation in the software, using my 32bits MCU? Can you adive the algorithm, or even source code:P, for doing

Keeping track of source code variants

狂风中的少年 提交于 2019-12-09 06:07:38
问题 I am soon starting to maintain a line of products containing variants of the same embedded software. Since I've been playing with git for one year and appreciate it very much, I'm likely to use it for source control. There are several options I can see for maintaining the variants of the firmware, but none pleases me too much. What are the best practices you apply for your own work? Alternatives I can think of: defines . Pre-processing. Pros: everything is always present in the source code,

Measuring clock cycle count on cortex m7

允我心安 提交于 2019-12-09 06:07:32
问题 I have been measuring clock cycle count on the cortex m4 and would now like to do it on the cortex m7. The board I use is STM32F746ZG. For the m4 everything worked with: volatile unsigned int *DWT_CYCCNT; volatile unsigned int *DWT_CONTROL; volatile unsigned int *SCB_DEMCR; void reset_cnt(){ DWT_CYCCNT = (volatile unsigned int *)0xE0001004; //address of the register DWT_CONTROL = (volatile unsigned int *)0xE0001000; //address of the register SCB_DEMCR = (volatile unsigned int *)0xE000EDFC; /

Transpose a 2D array

北慕城南 提交于 2019-12-09 06:07:29
问题 How do you efficiently transpose a matrix? Are there libraries for this, or what algorithm would you use? E.g.: short src[W*H] = { {1,2,3}, {4,5,6} }; short dest[W*H]; rotate_90_clockwise(dest,src,W,H); //<-- magic in here, no need for in-place //dest is now: { {4, 1}, {5, 2}, {6, 3} }; (In my specific case its src array is raw image data, and the destination is a framebuffer, and I'm embedded on ARM on a toolchain that doesn't support assembly) 回答1: There are libraries for this, in some

How hard is it for a software developer to learn how to program a microcontroller?

柔情痞子 提交于 2019-12-09 04:13:23
问题 I'm a software developer. I've been programming in high level languages for a few years. I would like to know, how to take my first step into programming hardware. Not something crazy complicated, but maybe some ordinary CE device? Assuming I don't need to put the PCB together with varies components, but just to program the tiny cpu? How low-level do I have to go? ASM? C? manipulating registers? or are the dev kit quite high level now? Is Java even in the picture? OO coding in hardware, is

C 'Volatile' keyword in ISR and multithreaded program?

依然范特西╮ 提交于 2019-12-09 03:06:35
问题 I read about usage of C volatile keyword in memory-mapped hardware register, ISR, and multithreaded program. 1) register uint8_t volatile * pReg; while (*pReg == 0) { // do sth } // pReg point to status register 2) ISR int volatile flag = 0; int main() { while(!flag) { // do sth } } interrupt void rx_isr(void) { //change flag } 3) multithread int volatile var = 0; int task1() { while (var == 0) { // do sth } } int task2() { var++; } I can see why compiler can mistakenly optimize the while in

Getting the IEEE Single-precision bits for a float

人盡茶涼 提交于 2019-12-09 01:49:17
问题 I need to write an IEEE single-precision floating point number to a 32-bit hardware register at a particular address. To do that, I need to convert a variable of type float to an unsigned integer. I can get the integer representation like this: float a = 2.39; unsigned int *target; printf("a = %f\n",a); target = &a; printf("target = %08X\n",*target); which returns: a = 2.390000 target = 4018F5C3 All good. However this causes a compiler warning "cast.c:12: warning: assignment from incompatible

Qt embedded compile error. fixing “Error: no such instruction” Error

雨燕双飞 提交于 2019-12-09 00:08:11
问题 I am trying to compile qt 4.7.4 using the angstrom tool chain installed at /home/user/Software for a beagle board. The error I am receiving is: /corelib/arch/qatomic_arm.h:131: Error: no such instruction: `swpb %al,%dl,[%esi]' My qmake.conf file is as follows: # # qmake configuration for building with arm-none-linux-gnueabi-g++ # include(../../common/g++.conf) include(../../common/linux.conf) include(../../common/qws.conf) # modifications to g++.conf QMAKE_CC = arm-angstrom-linux-gnueabi-gcc

Good emulators for embedded Linux

一个人想着一个人 提交于 2019-12-08 19:21:11
问题 Are there any good emulators for learning embedded Linux ? 回答1: If you want to play with Linux on the Arm, you can play with qemu. That way, you can emulate, for instance, an N8x0 tablet 回答2: Embedded Linux is like Linux, but sometimes with the capabilities of a microcontroller. Learn Linux on a normal PC, then find yourself a PIC toolkit that uses a C compiler and learn the MCU stuff on that. 回答3: The Beagle Board is a good DIY development board/environment for learning embedded Linux. The

Casting pointers on embedded devices

不想你离开。 提交于 2019-12-08 17:40:17
问题 I encountered a strange problem when casting and modifying pointers on a 32bit embedded system (redbee econotag running contiki OS to be specific). uint32_t array[2]; array[0] = 0x76543210; array[1] = 0xfedcba98; uint8_t* point = ((uint8_t*)array)+1; printf("%08x \n", *(uint32_t*)point ); output on my computer: 98765432 output on embedded device: 10765432 My computer behaves as I expect it to, the embedded device however seems to wrap around when it reaches the end of the word. Why does this