Hi Dawei,
I am sorry for my late response.
Thank you for more details.
I tested KT9Z1_638_LIN_demo software with similar results.
Per documentation: “after 5s off no LIN communication the device enters low power mode (LED D4 off)”.
When MCU is in low power mode, also D7 LED is turned off. Unfortunately, the MCU cannot be debugged in low power mode since there missing clocks.
So, I suppose that you testing KT9Z1_638_LIN_demo software without LIN master node.
If you testing KT9Z1_638_LIN_demo software with LIN master node, there might be some issue in LIN communication settings.
If no LIN master is used I recommend to use the SCI based demo, which allows to run the application and monitor the measured signals on a terminal as described in the documentation.
Regarding LIN demo and entering low power mode….
The LIN driver just provides information about the LIN no bus activity. The main.c does check this and enter low power mode…
So just ignore / comment out the following code will do the job.
if(l_status.word != 0) {
if(l_status.bit.gotosleep) {
LEDModeOff();
LEDRxOff();
B_PCR_WUEH_WULIN = 1;
B_PCR_WUEH_WUPTB4 = 1;
#ifdef LPMODE_SLEEP
ADCDisable();
TsenseDisable();
B_GPIO_VSENSE = 0;
l_sys_irq_disable(LI0);
B_TIE_C3I = 0;
PCREnterSleepMode();
while(1) DO_NOTHING;
#endif
#ifdef LPMODE_STOP
Let me know if you have any more questions or issues.
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------