If any one know how to config LIN0 to be the slave or at least some sample code for the initialize of LIN and the PB and PB.
here is the info:
Thanks in advance.
the voltage level of Lin_TX should be high level when no transmission but it always remain low level.
Thus it may affect Rx function so I can not go to Rx interrupt handler when Master send a header to the ECU as slave.
here is my implementation of setting PB2 and PB3.
/* LINFlex 0 */ /* Multiplexed signal configuration register */ /* SIUL2_MSCR_IO_18: SRC = 3 - Full drive strength without slew rate control 0BE = 1 - Enable the Output Buffer. SSS = 1 - Signal Select-Selects the LIN0Tx pin. */ BOARD_SIUL2_MSCR_REG(18U) = (0x32000001U) ; /* LIN0Tx - PB */
/* SIUL2_MSCR_IO_19: ILS = 00b - Automotive IBE = 1 - Enable the Input Buffer. */ BOARD_SIUL2_MSCR_REG(19U) = (0x00080000U) ; /* LIN0Rx - PB - IBE=1 */ /* SIUL2_MSCR_MUX_200: INV = 0 - Invert-The output is disabled. SSS = 0x02 - Source Signal Select-Selects the LIN0Rx pin. */ BOARD_SIUL2_MSCR_MUX_REG(200U) = (0x00000002U) ; /* LIN0Rx - PB - MSCR_MUX_200 = SSS=2*/
could you have a look.
Retrieving data ...