Author: TakashiM_61 Version: **
Translation - Japanese: PSoC 4 LINS_Start() が Error を返す場合 - KBA229137- Community Translated (JA)
The LINS_Start() API function is the one of API functions in the LIN Slave Component for PSoC® 4 to start the Component. The return values for this API function are as follows:
- Zero: If the initialization succeeds.
- Non-zero: If the initialization fails.
If LINS_Start() returns an error, i.e., non-zero, the initialization of the LIN Slave Component failed. The actual LIN Slave initialization is executed in the l_ifc_init_LINS() function, which is invoked from LINS_Start().
The l_ifc_init_LINS() function returns non-zero if LIN Slave initialization fails. The result of its initialization is decided by whether the LIN callback function l_ifc_aux_LINS() can be registered in SysTick timer slots in the LINS_TimerEnableInt() function.
Note that the LINS_TimerEnableInt() function is invoked from the l_ifc_init_LINS() function.
The LIN Slave Component periodically monitors LIN bus inactivity and measure sleep delays. The SysTick timer is used to this periodic process, and the periodic process is registered in SysTick timer slots as a callback function triggered by the SysTick timer interrupt.
The LIN callback function l_ifc_aux_LINS() cannot be registered in SysTick timer slots because of the following:
- Not enough number of SysTick timer slots prepared.
- The SysTick timer slot has been already full by another component callback function registered; for example, CapSense®.
To conclude, these reasons cause the LINS_Start() API function to return non-zero, which means that LIN Slave Component initialization has failed.