aduc7030 Analog Devices, Inc., aduc7030 Datasheet - Page 139

no-image

aduc7030

Manufacturer Part Number
aduc7030
Description
Integrated Precision Battery Sensor For Automotive
Manufacturer
Analog Devices, Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
aduc7030BCPZ
Manufacturer:
ADI/亚德诺
Quantity:
20 000
Part Number:
aduc7030BCPZ-8V
Manufacturer:
Analog Devices Inc
Quantity:
135
Preliminary Technical Data
Example LIN Hardware Synchronization Routine
Consider the following C-Source Code LIN Initialization Routine.
void LIN_INIT(void )
{
Using this configuration, LHSVAL1 begins to count on the first
falling edge received on the LIN bus. If LHSVAL1 exceeds the
value written to LHSVAL1, in this case 0x3f, a Break Compare
interrupt is generated.
ON the next falling edge, LHSVAL0 begins counting. LHSVAL0
monitors the number of falling edges and compares this to the
value written to LHSCON1[7:4], in this example the number of
edges to monitor is the sixth falling edge of the LIN frame, or
char HVstatus;
GP2CON = 0x110000; // Enable LHS on GPIO Pins
LHSCON0 = 0x1;
do{
}
while (!(HVstatus & 0x4));
while((LHSSTA & 0x20) == 0 )
{
}
LHSCON1 = 0x062;
LHSCON0 = 0x0114;
LHSVAL1 = 0x03F;
while((GP2DAT & 0x10 ) == 0 )
{}
LHSCON0 = 0x4;
IRQEN = 0x800;
HVDAT = 0x02; // Enable Normal LIN TX mode
HVCON = 0x08; // Write to Config0
do{
}
while(HVstatus & 0x1); // Wait until command is finished
HVstatus = HVCON;
// Reset LHS Interface
// Wait until the LHS Hardware is reset
// Sets Stop Edge as the fifth falling edge
// and the start edge as the first falling
// edge in the sync byte
// Gates UART RX Line, ensure no interference
// from the LIN into the UART.
// Selects the stop condition as a falling edge
// Enables Generation of an interrupt on the
// stop condition.
// Enables the interface
// Set number of 131kHz periods to generate a Break Interrupt
// 0x3F / 131kHz ~ 480us which is just over 9.5 TBits.
// Wait until LIN Bus returns High
// Enable LHS to detect Break Condition Ungate RX Line
// Disable all interrupts except Break Compare Interrupt
// Enable UART Interrupt
// The UART is now configured and ready to be used for LIN
// transmit command is correct
Rev. PrE | Page 139 of 150
the fifth falling edge of the SYNC byte. Once this number of
falling edges is received, a STOP condition interrupt is
generated. It is at this point that the UART is configured to
receive the Protected Identifier.
The UART must not be ungated, via LHSCON0[8], before the
LIN bus returns high. If this occurs, UART communication
errors may occur. Example code to ensure this is shown below:
This process is shown in detail in Figure 47.
ADuC7030/ADuC7033

Related parts for aduc7030