As the next generation LF driver chip of PCF7991, PJF7992 has made many optimizations based on it, 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 simulate the sending and receiving of data, which requires the master MCU to have a strict grasp of the time. However, when performing Transponder IMMO communication, PJF7992 (ABIC2) adds LIN single-line communication and SPI with buffered function. In this way, customers can directly obtain the corresponding command bytes from ABIC2 without spending extra experience to parse bit by bit.
2. Operation Instructions
First we need to use the ABIC2 Demo board and use S32K144 as the main MCU.
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 LIN communication mode)
The S32K144 side 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 S32K144 to the SPI interface of ABIC2, and ABIC2 needs to be powered by 12V. Then open S32DS and import the corresponding project.
At this point, ABIC can already be run, but in order to perform the corresponding IMMO encryption authentication, we need to add an encryption library such as HT3:
1. Copy the HT3cryptABIC2.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. Uncomment the compilation flag HT3_CRYPT_LINKED in the header file defs.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 debug 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 is successfully implemented.
3. References
【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