NuMicro® NUC029LEE/NUC029SEE32-bit Arm® Cortex® -M0 MicrocontrollerAug, 2018 Page 354 of 497 Rev 1.00NUMICRO® NUC029LEE/NUC029SEE TECHNICAL REFERENCE MANUALSlave mode with automatic resynchronizationIn Automatic Resynchronization mode, the controller will adjust the baud rate generator after eachsync field reception. The initialization process flow of Automatic Resynchronization mode isshown as follows:1. Select the desired baud rate by setting the UA_BAUD register.2. Select LIN function mode by setting UA_FUN_SEL (UA_FUN_SEL[1:0]) to “01”.3. Enable automatic resynchronization function by setting LINS_ARS_EN (UA_LIN_CTL[2]) to1.4. Enable LIN slave mode by setting the LINS_EN (UA_LIN_CTL[0]) is set to 1.When the automatic resynchronization function is enabled, after each LIN break field, the timeduration between five falling edges is sampled on UART peripheral clock and the result of thismeasurement is stored in an internal 13-bit register and the UA_BAUD register value will beautomatically updated at the end of the fifth falling edge. If the measure timer (13-bit) overflowsbefore five falling edges, then the header error flag LIN_HERR_F (UA_LIN_SR [1]) will be set.start bit0 bit1 bit2 bit3 bit4 bit5 bit6 bit7 stopUA_BAUD (m)UA_BAUD (n)Measurement timeBreak fieldLIN BusUA_BAUDUpdate baud rate if auto re-syncfunction enableFigure 6.13-14 LIN Sync Field MeasurementWhen operating in Automatic Resynchronization mode, software must select the desired baudrate by setting the UA_BAUD register and hardware will store it at internal TEMP_REG register,after each LIN break field, the time duration between five falling edges is sampled on UARTperipheral clock and the result of this measurement is stored in an internal 13-bit registerBAUD_LIN and the result will be updated to UA_BAUD register automatically.In order to guarantee the transmission baud rate, the baud rate generator must reload the initialvalue before each new break reception. The initial value is programmed by the application duringinitialization (TEMP_REG). User can set LINS_DUM_EN (UA_LIN_CTL [3]) to enable auto reloadinitial baud rate value function. If the LINS_DUM_EN (UA_LIN_CTL [3]) is set, when received thenext character, hardware will auto reload the initial value to UA_BAUD, and when the UA_BAUDbe updated, the LINS_DUM_EN (UA_LIN_CTL [3]) will be cleared automatically. The behavior ofLIN updated method as shown in the following figure.Note1: It is recommended to set the LINS_DUM_EN bit before every checksum reception.Note2: When a header error is detected, user must write 1 to LINS_SYNC_F (UA_LIN_SR[3]) tore-search new frame header. When writing 1 to it, hardware will reload the initial baud rateTEMP_REG and re-search new frame header.Note3: When operating in Automatic Resynchronization mode, the baud rate setting must beoperated at mode2 (DIV_X_EN (UA_BAUD [29]) and DIV_X_ONE (UA_BAUD[28]) must be 1).