02-03-2012, 02:42 PM
automotive communication
Interview Questions at Automotive Company Bangalore India.docx (Size: 75.98 KB / Downloads: 54)
Q: How is ISR handled in vxworks ?
A: VxWorks supplies interrupt routines which connect to C functions and pass arguments to the functions to be executed at interrupt level. To return from an interrupt, the connected function simply returns. A routine connected to an interrupt in this way is referred to as an interrupt service routine (ISR) or interrupt handler. When an interrupt occurs, the registers are saved, a stack for the arguments to be passed is set up, then the C function is called. On return from the ISR, stack and registers are restored.
Q: How do you connect the C Function to any interrupt?
A: Using intConnect(INUM_TO_IVEC(intNum), intHandler, argToHandler).
The first argument to this routine is the byte offset of the interrupt vector to connect to. The second argument is the interrupt handler and the last is any argument to this handler.
Q: Is the C Code directly vectored to Hardware interrupts using IntConnect? Explain?
A:No. Interrupts cannot actually vector directly to C functions. Instead, intConnect( ) builds a wrappper,a small amount of code, that saves the necessary registers, sets up a stack entry (either on a special interrupt stack, or on the current task's stack) with the argument to be passed, and calls the connected function. On return from the function it restores the registers and stack, and exits the interrupt;
what is the difference between linked list and array?
Storage:
1) Arrays are statically allocated whereas linked list are dynamically allocated and linked.
Generally, if the number of allocations are known before hand, we use arrays. Otherwise linked list
Performance:
2) Array is a high performance way of storing a group of data because each element is laid out next to it's neighbor in memory. This allows for very fast access because (a) the code can do a little math and jump quickly to any location in the array, and (b) the elements are all grouped together so they tend to be in memory at the same time (fewer page faults and cache misses).
THERE ARE TWO SENARIOS WE HAVE TO CONSIDER.
1) Suppose the basic can message id is part of extended can frame message then the basic can message has the high priority.
2) I will post it later
Describe some problems associated with multimaster protocols. How does CAN handle them?
Ans: This problem can be solved by using CAN protocol operating principle is CSMA/CD
Describe the process of bus arbitration in CAN?
Ans: yes I know the Answer,If you want whole process,i have to write a lot of story
What's the difference between CSMA/CR and CSMA/CD?
Ans: We will post you later boss
How can we identify a specific sensor in a CAN network?
Ans: We cant identify which type of device on the CAN Network.