As the next-generation LF driver chip of PCF7991, PJF7992 has made many optimizations on its basis, one of which is the communication interface. For PCF7991 (ABIC), due to its special timing requirements, it is necessary to use the IO port to send and receive analog data, which requires the main control MCU to have a more strict grasp of time. However, when PJF7992 (ABIC2) performs Transpounder IMMO communication, it adds LIN single-wire communication and SPI with Buffered function. In this way, customers can directly obtain the corresponding command bytes from ABIC2 without having to spend additional time to parse them bitwise.
Second, the operation instructions
First of all, we need to use the ABIC2 Demo board and use S32K144 as the main MCU at the same time.
This time we will use SPI for communication, so we need to set the IOREF level of ABIC2 to 3.3V, which is SPI communication. (When it is grounded, it is in LIN communication mode)
The S32K144 terminal needs to use a corresponding IO input to detect the communication mode.
/* Check VIO level and set the variable accordingly to perform device communication via the selected interface option */
ABIC2_checkVIOSense();
/* Set base station interface data rate and initialize controller module */
if ( g_u8_usedBasestationInterface == ABIC2_BASESTATION_INTERFACE_SPI )
{
g_u16_basestationInterfaceSpeed = ABIC2_SPI_HIGHSPEED;
S32_LPSPI0_init( g_u16_basestationInterfaceSpeed );
}
else if ( g_u8_usedBasestationInterface == ABIC2_BASESTATION_INTERFACE_LIN )
{
g_u16_basestationInterfaceSpeed = ABIC2_LIN_HIGHSPEED;
S32_LPUART2_LIN_init( g_u16_basestationInterfaceSpeed );
}
Connect the S32K144 to the SPI interface of ABIC2, and ABIC2 also needs to use a 12V power supply. Then open S32DS to import the corresponding project.
At this time, ABIC can already be run, but in order for it to perform the corresponding IMMO encryption authentication, we need to add an encryption library like HT3.:
1. HT3cryptABIC2. Copy the c file to the FIRMWARE/comps/HT3/src folder (this file needs to be released by contacting the relevant person).
2. Add this file to the debug build path in S32 Design Studio.
3. Cancel the header file defs. Comments for the compilation flag HT3_CRYPT_LINKED in H.
#define HT3_CRYPT_LINKED /**< Uncomment if Ht3cryptABIC2.c is linked to the project */
4. Build the project.
5. Click the "Debug” button to start the debugging mode.
After that, we can see the corresponding Passed prompt through the serial port assistant, which means that the IMMO HT3 encryption authentication of ABIC2 has been successfully implemented.
3. Reference materials
【1】 UM-SCA1901 S32 ABIC2 Immobilizer Rev. 1.0 — 2019 May 16
【2】 Simple operation manual-P14-108 Carman-REPS_V2.0 (REPS Demo Board)_Hayden Liu_2015.05.26. pdf
comment