Abnormal behavior due to debugger connection

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

Abnormal behavior due to debugger connection

1,192件の閲覧回数
jwjung
Contributor II

hello, i'm using s32k312 MCU chip

When field data is checked after a debugger connection, a strange value is output. When the expected value is 299, it is expressed as 691, 384, 214, and this value fluctuates.

However, the expected value is expressed when the board is re-operated after the debugger is released.

Is there a value that should be specified as an option when debugging? Please check.

The debugger in use is a PEmicro Debugger, USB1 MultiLink FX Rev B Port and core: M7, target is s32k312

best regard

0 件の賞賛
返信
5 返答(返信)

1,169件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @jwjung 

Could you please provide a more detailed explanation of the steps you followed and share additional information about the application? This will help us better understand your approach and offer more targeted guidance.

 

BR, VaneB

0 件の賞賛
返信

1,157件の閲覧回数
jwjung
Contributor II

Hi, @VaneB 

thanks to reply

 

What environment did you do debugging in?

Cell simulator - jig board - PCB board connected and debugger connected

Apply debugger power using power branched from the board (does not use the 5V power supply option via USB during debug option)

 

How did you debug it?

1. Debugger to PCB Board
2. Debug Configuration - project_name.DEBUG_FLASH 
3. Hold breakpoint to read field data

 

 

Additional infomation about Application

What is the application using the S32K312 chip for?

BMS Application develop

 

Software and environment information in use

1) S32DS.3.5_b220726_win32.x86_64.exe
2) SW32_S32DS_3.5.8_D2311 package
3) SW32_S32DS_OfflineDevPack_3.5.0_D2207 package
4) SW32K3_RTD_4.4_3.0.0_P01_D2303_DS_updatesite package
5) NXP FreeRTOS 10.0.5 package

 

Setting up the code or related to the problem

Use the desired field data by specifying breakpoint
Log Error Not Out, DevAssert() Not Out

configUSE_tickless_IDLE set 0

System Clock : default clock(peripheral - os - freertos - General option)

 

thanks.

0 件の賞賛
返信

1,115件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @jwjung 

Thank you for sharing the information. Unfortunately, I am still a bit confused and unsure where the issue lies.

Could you please provide more details about your application? Any additional information regarding the application setup, development environment, or recent changes you have made could help us better analyze the root cause of the issue.

0 件の賞賛
返信

1,095件の閲覧回数
jwjung
Contributor II

hi @VaneB

 

First of all, I will share the firmware source.

 

Sensing data was read from ADI chip GPIO Register Memory and expressed.(SPI IA port was used for communication with the ADI chip.)

The field data was checked by holding the breakpoint at line number 452.

 

Data process :  MCU - SPI IA, MOSI - ADI - SPI IA, MISO - MCU

Flow : Initialize(GPIO, PORT, etc..), CS High - ADI Initialize(CS low, Send Command via SPI IA port) - (CS low and then)Send command to read ADI Register Memory - Calculate NTC voltage - read field Data using debugger. 

(loop : Read Command - Calculate NTC Voltage - read field Data)

 

thanks.

0 件の賞賛
返信

1,066件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @jwjung 

I have reviewed your code and noticed that the value sent via CAN is derived from a series of operations based on the value received from the IOR_CalcTemp() function. Could you please verify if the value obtained seems to fluctuate since its calculation?

Additionally, fluctuations in values during a debug session can often be caused by several factors related to the debugging process itself. Some common causes include:

1. Debugger Interference: During debugging, the debugger interacts with the system in real-time, which may alter the normal execution of code, especially if breakpoints, stepping, or real-time monitoring is being used.

2. Debugger-induced Delays: The debugging process introduces delays as the code is paused and controlled by the debugger. These delays can affect the timing of variable updates, leading to fluctuations in their values.

3. Un-synchronized Memory Access: The debugger might access memory or variables while the code is running, which can lead to unpredictable changes in their values during the session.

4. Compiler Optimizations: The compiler may apply optimizations in debugging mode that alter the normal behavior of the system. This can result in discrepancies in the way variables are calculated or updated.

5. Clock or Timing Issues: The clock behavior or timing in the system could be impacted by the debugger, which can affect the consistency of values, especially if the system depends on precise timing or real-time operations.

6. Modification of Control Registers: Debuggers can modify microcontroller registers, potentially altering the normal flow of operations and causing fluctuations in values.

To identify the exact cause, I recommend checking whether the value from IOR_CalcTemp() itself fluctuates when running without the debugger. This will help determine if the issue is related to the debugging environment or the calculation process itself.

0 件の賞賛
返信