2400913_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2400913_en-US

2400913_en-US

#S32K388 S32K388 LPI2C will stop when debug mode is entered

When using lpi2c, I encountered a situation where the program got stuck in debug mode. However, when I disconnected the PE connection and restarted the program, it worked properly. The program got stuck in debug mode during runtime.

do
{
/* Master send data */
Lpi2c_Ip_MasterSend(Instance);
ElapsedTicks += OsIf_GetElapsed(&CurrentTicks, I2C_TIMEOUT_TYPE);

}while ((Lpi2c_Ip_MasterGetTransferStatus(Instance, NULL_PTR) == LPI2C_IP_BUSY_STATUS) && (ElapsedTicks < TimeoutTicks));

Is there any way to solve this problem?

Re: #S32K388 S32K388 LPI2C will stop when debug mode is entered

Hi @zhangyu5454 

Could you please check if the I2C Debug Enable option is selected?

When MCR[DBGEN] = 1, the LPI2C module continues to work while the MCU is being debugged.

When MCR[DBGEN] = 0, after programming the application and running the board normally (without a debugger attached), the LPI2C should work as expected.


BR, VaneB

Re: #S32K388 S32K388 LPI2C will stop when debug mode is entered

Hi @zhangyu5454 

I have included the image below for reference:

VaneB_0-1786396779346.pngVaneB_0-1786396779346.png

Re: #S32K388 S32K388 LPI2C will stop when debug mode is entered

Thanks for your reply.I use .mex to configure i2c, how can I set it to control MCR[DBGEN] =1

Re: #S32K388 S32K388 LPI2C will stop when debug mode is entered

Hi @zhangyu5454 

This option has been added to the latest RTD release and can now be configured directly through the Peripherals Tool. 

As you are using an earlier RTD version, configuring MCR[DBGEN] in the application code would be the recommended approach.

Re: #S32K388 S32K388 LPI2C will stop when debug mode is entered

zhangyu5454_0-1786418199524.pngzhangyu5454_0-1786418199524.png

I noticed that our pages display differently, I couldn't find this option, note that my version is RTD5.0

タグ(1)
評価なし
バージョン履歴
最終更新日:
2 週間前
更新者: