microcontroller

Basic high performance data authenticity

a 夏天 提交于 2019-12-07 19:46:33
问题 (I am not a native speaker and might not be correct in terms of terminology. Sorry about that.) I am transmitting data via radio between AVR microcontrollers for personal use and would like for clients to demonstrate the authenticity of transmitted data in that it originates from one of the authorized clients. This means I am not requiring non-repudiation and would be able to pre-define a shared key. I have done some research on different approaches and found that I need some assistance on

How to split hex byte of an ASCII character

元气小坏坏 提交于 2019-12-07 18:04:49
问题 What basically i want to do is For eg: 'a' hex equivalant is 0x61 , can i split 61 in to 6 and 1 and store them as '6' and '1' ? A buffer is receiving data like this: rx_dataframe.data[0] is H'00,'.'// H' is Hex equivalant and '' is ASCII value rx_dataframe.data[0] is H'31,'1' rx_dataframe.data[0] is H'32,'2' rx_dataframe.data[0] is H'33,'3' I need to to convert hex values 0x00,0x31,0x32,0x33 in to char value '0','0','3','1','3','2';'3','3' and to store them at the locations of tx_buff_data[]

Why is the reset handler located at 0x0 for Cortex-A but not for Cortex-M3

喜欢而已 提交于 2019-12-07 15:07:06
问题 What is the reason Cortex-M3 has the initial stack pointer value located at 0x0, and reset handler located at 0x4? What is the design justification for this? Why couldn't the ARM guys leave 0x0 to the reset handler like they do for Cortex-A, then initialize SP inside the reset handler? 回答1: I think this one falls under the "it's not a bug, it's a feature" banner. The ARM architecture M (microcontroller) profile has a completely different exception model to the A and the R profiles. The A

What is the size of integer in 8-bit, 16-bit, 32-bit processors/microcontrollers?

我与影子孤独终老i 提交于 2019-12-07 12:43:38
问题 What is the size of integer in 8-bit, 16-bit, 32-bit processors/microcontrollers ? I guess it depends on the internal accumulator/register size. But not sure. Thanks 回答1: I'm only aware of one programming language that defines an integer data type, but it's seldom used for 8 and 16-bit architectures. C is the most widely used language for programming 8-bit, 16-bit, and 32-bit architectures, so I assume you are looking for an answer in the context of C. There are several "integer" data types

Moving data from memory to memory in micro controllers

只谈情不闲聊 提交于 2019-12-07 12:22:53
问题 Why can't we move data directly from a memory location into another memory location. Pardon me if I am asking a dumb question, but I think this is a true situation, at least for the ones I've encountered (8085,8086 n 80386) I am not really looking for a solution for moving the data (like for eg, using movs n all), but actually the reason for this anomaly. 回答1: Most CPU varieties don't allow memory-to-memory moves. Normally the CPU can access only one memory location at at time, which means

Connect to SQL Server from Microcontroller (Arduino or Fez with .Net Micro Framework)

一个人想着一个人 提交于 2019-12-07 05:32:01
问题 I'm looking for examples, tutorials, or just "this+this+this should work" for reading from and writing to a SQL server (2008) from a microcontroller such as the Arduino board. I've also looked at (and will probably go with) devices with the .Net Micro Framework such as the Fez Cobra. The Micro Framework does not include ADO. I'm sure this is going to involve some XML, but I can't figure out which technology to further investigate. I do not want to have an PC application to serve as a go

Why 24 bits registers?

回眸只為那壹抹淺笑 提交于 2019-12-07 05:25:03
问题 In my work I deal with different micro-controllers, micro-processors and DSP processors. Many of them have 24-bits registers and counters. I know how to use them, this is not my question. My question is why do they have 24-bits register! why not make it 32 bit? and as I know, it is not a problem of size, because the registers are already 32bits, but have maximum of 0xFFFFFF. Do this provide easier HW implementation? Faster calculations? Or it is just "hmmm, lets put 24-bits registers to make

Building a two-part firmware image using GCC toolchain

依然范特西╮ 提交于 2019-12-07 03:08:00
问题 I have some firmware built with GCC that runs on an ARM Cortex M0 based microcontroller. The build currently generates a single binary image that can be written into the program memory of the microcontroller. For reasons to do with field update, I need to split this image into two parts that can be updated separately. I'll call these Core and App . Core : contains the interrupt vector table, main() routine, and various drivers and library routines. It will be located in the first half of the

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

我怕爱的太早我们不能终老 提交于 2019-12-06 14:36:34
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. 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. Example: void MyFunction( void ) @ "MyFunctionsSection" { ... } In the linker file you have to define the section

How to reserve a range of memory in data section (RAM) and the prevent heap/stack of same application using that memory?

走远了吗. 提交于 2019-12-06 10:51:46
问题 I want to reserve/allocate a range of memory in RAM and the same application should not overwrite or use that range of memory for heap/stack storage. How to allocate a range of memory in ram protected from stack/heap overwrite? I thought about adding(or allocating) an array to the application itself and reserve memory, But its optimized out by compiler as its not referenced anywhere in the application. I am using ARM GNU toolchain for compiling. 回答1: There are several solutions to this