Qualcomm Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

Usually the memory/control registers of the device itself is memory or portmapped to program the device. In some cases, you can directly write/use the CPU's DMA engine to copy chunks of data, then program the device. Sometimes, you can just give the physical memory location and the size, and let the device's DMA chip do it for you.

It all depends on the device.

- Anonymous April 19, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think what he is expecting is
#define DDREG *(volatile unsigned long *) & 0xAAAAAAAA //some hw addr of the register

Then u can access the register
unsigned char t;
t = DDREG;

- clueless August 29, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I thing he is looking for the logic of memory mapped registers.

- sumit saxena December 16, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Depends on Device:
1, Processor is memory-mapped IO. Map the device's register to conventional memory.
* Used appropriate sized and signed type for register: e.g. one byte can be declared as char; two byte can be declared as unsinged short.
*int32_t, Uint32_t declare in <stdint.h>
*Some compilers provide language extensions that will let you position an object at a specified memory address. For example, using the TASKING C166/ST10 C Cross-Compiler's _at attribute you can write a global declaration such as:
unsigned short count _at(0xFF08);
* Use pointer:dual_timers *const timers
= (dual_timers *)0x03FF6000;
2, Processor is port-mapped IO. Map the device's register to seperate memory space.
In this scenario, needing exta library extention, or even assembly language.
e.g. IN and OUT for Intel 80X86

- Linkan Chen, UFL, 1-352-328-6704 January 31, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

it is very easy to write into any memory location
Uint32_t *addr;

addr = (Uint32_t)0x12345678; //0x12345678 - is any address location
*addr = 0x2341; //0x2341 is the value u want to write

- kanak March 24, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

or simply:
*((int*)0x12345678) = 0x2341

- olegravi10 July 03, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

mmap

- Anonymous January 19, 2015 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More