microcontroller

Opencv on TI microcontroller [closed]

风格不统一 提交于 2019-12-08 14:09:26
问题 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 . Are there any OpenCV cross compilers available for MICROCONTROLLERs? Thanks 回答1: OpenCV cross compiler? Errr... I"m not sure such a thing exists! Let's not mix cross-compilers (like gcc ), with OpenCV - which is a cross-platform library for computer vision. But in case you meant OpenCV compiled for

Microcontroller memory allocation

血红的双手。 提交于 2019-12-08 12:24:53
问题 I've been thinking for day about the following question: In a common pc when you allocate some memory, you ask for it to the OS that keeps track of which memory segments are occupied and which ones are not, and don't let you mess around with other programs memory etc. But what about a microcontroller, I mean a microcontroller doesn't have an operating system running so when you ask for a bunch of memory what is going on? you cannot simply acess the memory chip and acess a random place cause

AVR XYZ Registers

ぐ巨炮叔叔 提交于 2019-12-08 10:42:45
问题 What is the difference beatwean X, Y and Z registers in AVR microcontrollers. What for each of them suitable in C compilers? And where do compilers store heap pointer, stack pointer, frame pointer? Do this registers have the same capabilities or providing addressing in different spaces(ex. EEPROM, RAM). 回答1: X Y and Z registers are actually pairs of r27:r26, r29:r28 and r31:r30 registers. Each of them can be used as indirect pointers to SRAM: ld r16, X with post-increment, or pre-decrement:

How to pass a bitfield (by reference) to a function?

我怕爱的太早我们不能终老 提交于 2019-12-08 08:19:28
My question is how to pass a bitfield instance by reference to a function. I have performed this as shown below, but when i eneter the function DAC_set_gain_code, the processor throws an interupt fault. Is what i am doing correct as far as passing the bitfield goes? I have created a bitfield (see below) which represents a 24bit register on an DAC chip, which i want to write into and lives in the .h file. typedef struct { uint8_t rdwr_u8: 1; uint8_t not_used_u8: 3; uint8_t address_u8: 4; uint8_t reserved_u8: 8; uint8_t data_u8: 8; }GAIN_REG_st; I have a function which initialises the bitfield

UART to Qt software error - why data always split?

戏子无情 提交于 2019-12-08 07:53:11
问题 I am tryig to display data I receive via UART on my Qt application. I send all my data from my microcontroller at once, but my qt application receives it in multiple parts why? this is what I get: http://imgur.com/kLXRvU5 in stead of: http://imgur.com/h2yNZjl So every time I receive data my slot function gets called, hence the "data received". But my data is split in two parts. Why please? my code: MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)//,

Why do I need an infinite loop in STM32 programming?

余生颓废 提交于 2019-12-08 06:56:46
问题 I'm programing a STM32F4 in C (gcc), it's a ARM Cortex M4, I see all examples finish their main() function with an infinite loop, even when the rest of the program will be executed from interruptions. If I try to remove the loop from my program, the interruptions stop being fired too. Why can't I just remove this loop and exit the main thread? here is the assembly (I guess it's thumb, but I can't read that, even with the doc): LoopFillZerobss: ldr r3, = _ebss cmp r2, r3 bcc FillZerobss /*

How to specify a memory location at which function will get stored?

ⅰ亾dé卋堺 提交于 2019-12-08 05:45:25
问题 Can anyone please let me know what are the possible ways in which we can store a function(in C) at a fixed memory location. I am using IAR IDE for ARM cortex m3 core. 回答1: How functions and data can be placed in memory is described in section "Controlling data and function placement in memory" of the IAR manual "IAR C/C++ Development Guide". The only way I see to place a specific function at a specific address is to define a section in memory where to place this and only this function.

Linker file vector table for bootloader setup

北战南征 提交于 2019-12-08 04:43:21
问题 I am currently trying to use a bootloader application created using MCUXPresso that requires that my application start address is located at 0x80000. According to the following documentation: However, the .bin I generate is created with Kinetis Design Studio (an earlier version of MCUXpresso) and does not have the option to modify the vector table in such an easy way as in MCUXPresso. What I've been trying is modifying the linker file manually doing the following: ENTRY(Reset_Handler) /*

Count seconds and minutes with MCU timer/interrupt?

天大地大妈咪最大 提交于 2019-12-08 04:23:53
问题 I am trying to figure out how to create a timer for my C8051F020 MCU. The following code uses the value passed to init_Timer2() with the following formula: 65535-(0.1 / (12/2000000)=48868. I set up the timer to count every time it executes and for every 10 counts, count one second. This is based on the above formula. 48868 when passed to init_Timer2 will produce a 0.1 second delay. It would take ten of them per second. However, when I test the timer it is a little fast. At ten seconds the

How to interact with USB device using PyUSB

假装没事ソ 提交于 2019-12-08 01:26:00
问题 I have so far gotten to the stage of finding the device, now I am ready to talk to the USB using the devices protocol laid out in the specification on page 22. libusb is installed on my machine and so is PyUSB. import usb.core import usb.util # find our device dev = usb.core.find(idVendor=0x067b, idProduct=0x2303) # was it found? if dev is None: raise ValueError('Device not found') # b are bytes, w are words reqType = '' bReq = '' wVal = '' wIndex = '' dev.ctrl_transfer(reqType, bReq, wVal,