Announcements

Webinar: Integrated solutions for smaller, simpler low-voltage motor control design.
Join the webinar to experience!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
AmolKoli
Level 4
Level 4
First solution authored 10 questions asked 50 sign-ins

In continuation to thread:
https://community.infineon.com/t5/MOTIX-MCU/TLE986x-SWD-device-is-not-detected-after-a-program-write...


After following the procedure to port the code for new device we are facing a new problem.

The Program runs fine in Debug mode, but in Release/Run mode the program doesnt operate as expected.

Its difficult to analyse the issue as in Debug mode it runs totally fine.

When we run without debug, as we could observe the code is running as per our commands, some states in code are viewed on LIN. But the BDRV is not operational, means we dont see any output from the driver unit to motor.

What could possibly go wrong? any hints to debug the issue?

 

update:
Some times even in Debug mode (very rarely) the program got stuck.
I collected some snapshots of register status when the program was not running correctly

0 Likes
1 Solution
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AmolKoli,

After observing the VS supply waveform we can tell that the ramp-up rate is very slow for VS. You can check with the other power supply or battery with a faster ramp-up rate.

Sometimes, If the 12 V power supply increases slowly, the bridge driver could go into protection mode, since the charge pump under-voltage can be triggered before the supply Vs is stable. One solution is to make the bits DRVx_VCPLO_DIS = 1 and DRVx_VSDLO_DIS = 1. Further VCP_LOWTH2 can be set to lower threshold 0. Alternatively,  disable the interrupts of the bridge driver during module initialization ( NVIC_ISER0.bit.Int_BDRV =0 ). Care must be taken to enable again the interrupts and the bridge protection, once Vs supply is stable.

 

Thank you

Best regards

Raj Chaudhari

View solution in original post

0 Likes
25 Replies
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AmolKoli,

Can you please let us know the following to understand the system:

1) What is the device/IC being used and is it Eval board or custom board?

2) Is it working with Eval board?

3) Which application is running? If possible please share the project.

4) What was the observation before and after program getting stuck?

Thank you

Best Regards

Raj Chaudhari

 

0 Likes
AmolKoli
Level 4
Level 4
First solution authored 10 questions asked 50 sign-ins

Hello @Raj_C 

1) What is the device/IC being used and is it Eval board or custom board?
It is custom board. TLE987QXA20 IC is used.

2) Is it working with Eval board?
The Sw runs fine with Eval board. But the difference is that the Evalboard is TLE9869 deployed.
We have ported the code for TLE9867 device

3) Which application is running? If possible please share the project.
Sorry but the project is customer confidential, I am afraid we cannot share it.
the application is developed on top of DC motor + LIN sample code

4) What was the observation before and after program getting stuck?
Could your also refer to excel attached, i could capture some registers when we faced the issue.
In run mode we cannot see any behavior , we see that the motor is just not operating, wheras in debug mode it operates

0 Likes
lock attach
Attachments are accessible only for community members.

Hello,

I have attached project config file and confiq.icwp, if they can help. Thanks

0 Likes

Hello @Raj_C ,

Any update please

0 Likes
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AmolKoli,

In the attached Project settings I can see that IROM2 is not selected. Can you please check and confirm if the NAC and NAD values are updated at the location 0x1100EFFC?

Raj_C_0-1705405460484.png

Please also selected IROM2 (As shown above) and let us know if this helps.

 

Thank you

Best Regards

Raj Chaudhari

 

0 Likes
AmolKoli
Level 4
Level 4
First solution authored 10 questions asked 50 sign-ins

Hello @Raj_C ,

I tried running with selecting IROM2. The issue still persists.

I can see the values being updated

AmolKoli_0-1705458398631.png

 

0 Likes
lock attach
Attachments are accessible only for community members.

Hello @Raj_C ,

I collected these ROM RAM hex files in Debug and run mode.
ROM files look same. 
Is there any possibility of issues due to incorrect addressing?

Could you please let know if any suggestions, we have tried every other possible way, but no success yet!

0 Likes
lock attach
Attachments are accessible only for community members.

Hello @Raj_C 

Update:
I tried using the Keil sample project to rotate a DC motor by changing the target device.
Even in this code the behavior is same, code runs in debug mode but not in Normal mode.
Is there a problem in porting the code? Doesnt seem so since we have double checked the config file.
Also can the different schematic design for custom board be an issue?
project is attached.

0 Likes

Hello,

Other than the config.icwp there is one more file in the RTE folder "ICW_TLE986x.xml".(seems having template of config wizard.
Is this file being used by the project?
Because, the  config.icwp file is replaced by the older device file, but this file remains as is

 

0 Likes

Hello Team,

Its long since an update. 

The program work fine when there is hard(PIN) RESET, 
but with power on reset it does not work.
I tried to connect just the Reset pin of debugger to board, after reset is triggered, the program runs good in run mode.

Any suggestions?

0 Likes
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AmolKoli,

Sorry for the delayed response.

1) After each programming cycle do you have to press the reset on the hardware to run the example? 

2) Is it the case with the EVALKIT?

3) Did you follow the EVALKIT for a reference for your custom board design?

4) Can you please let us know your observation after enabling the following option in the KEIL.

Raj_C_0-1705921481060.png

 

Thank you

Best Regards

Raj Chaudhari

 

 

0 Likes
AmolKoli
Level 4
Level 4
First solution authored 10 questions asked 50 sign-ins

Hello @Raj_C 

1) After each programming cycle do you have to press the reset on the hardware to run the example? 
There is no reset on Hardware since its custom board. We just connected the Reset pin to Debugger Reset(TMS and clk disconnected) and when the Reset is trigger from Debugger(without running debug mode) it works

2) Is it the case with the EVALKIT?
With Eval kit The program works fine, the problems come only after porting code for custom board device

3) Did you follow the EVALKIT for a reference for your custom board design?
Yes, Eval kit is followed as reference as far as I know

4) Can you please let us know your observation after enabling the following option in the KEIL.
Looks the program works good in this case too. With this setting and Flash download, without Power cycle restart, the program works good.
If I give a Power restart, it doesnt work.
It seems it works after a HW reset but not Power On reset

0 Likes
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AmolKoli,

Can you please let us know what is the power supply source for the custom board and the Eval board.

Thank you

Best regards

Raj Chaudhari

0 Likes
AmolKoli
Level 4
Level 4
First solution authored 10 questions asked 50 sign-ins

Hi @Raj_C 

Same Power supply source is used for both Boards.
Its a Regulated DC Power supply, 0-18V 5A supply.
We are supplying 12V Vsup

@Raj_C Please let know if additional info is needed. Thanks

0 Likes

Hello @Raj_C ,
Any update please?
We have some important tests planned and we are stuck with this issue since 2-3 weeks!
Requesting your support

0 Likes
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AmolKoli,

Please check the board with the different power supply if it works fine or not. There is a chance that the RESET pin is not getting released. During the power-up sequence as shown in Figure 18 Power-on and startup behavior of reset of TLE986x UM, if the RESET pin remains low even after VDDPOK and VDDCSTB is achieved then the device will not execute the code.

Can you please check the status of RESET and VS with oscilloscope.

 

Thank you

Best Regards

Raj Chaudhari

0 Likes
AmolKoli
Level 4
Level 4
First solution authored 10 questions asked 50 sign-ins

@Raj_C 

Thank you for your response, Will check as suggested. 

Although it is not like the device is not executing the code totally, it runs partially, LIN is working OK.
The original question:

AmolKoli_0-1706077596861.png

 

0 Likes
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AmolKoli,

Can you please clarify if the device is executing the code after POR (Power on RESET) or not? From your previous statement, I can understand that POR can execute the code but BDRV is not working only. Now, after POR if you do another Hardware reset the BDRV is working properly. Is my understanding correct?

 

Thank you

Best Regards

Raj Chaudhari

0 Likes
AmolKoli
Level 4
Level 4
First solution authored 10 questions asked 50 sign-ins

Hello @Raj_C 
Your understanding is correct.

Also POR behavior as suggested:

AmolKoli_0-1706080308413.png

 

0 Likes
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AmolKoli,

Please try to clear the status of the BDRV_ISCLR before starting the motor operation. You can refer to the BDRV diagnosis function from the BDRV_EMO_DC code example from TLE986x SDK.

Reference for BDRV_ISCLR: TLE986x UM  (page 202)

Thank you

Best Regards

Raj Chaudhari

0 Likes
AmolKoli
Level 4
Level 4
First solution authored 10 questions asked 50 sign-ins

Hello @Raj_C ,
I used the same function to check and clear any Interrupt Flag.
The code worked for the first time, but doesnt work frequently after POR still.

Called the below function before calling the BDRV(CCU6) PWM update.

void Bdrv_Diagnose(void)
{

if (BDRV->CTRL1.bit.LS1_OC_STS == 1)
{
/* Overcurrent detected on Low Side 1 */
/* Clear status bit */
SCUPM->BDRV_ISCLR.bit.LS1_OC_ICLR = 1;
}
if (BDRV->CTRL1.bit.HS1_OC_STS == 1)
{
/* Overcurrent detected on High Side 1 */
/* Clear status bit */
SCUPM->BDRV_ISCLR.bit.HS1_OC_ICLR = 1;
}
if (BDRV->CTRL1.bit.LS2_OC_STS == 1)
{
/* Overcurrent detected on Low Side 2 */
/* Clear status bit */
SCUPM->BDRV_ISCLR.bit.LS2_OC_ICLR = 1;
}
if (BDRV->CTRL1.bit.HS2_OC_STS == 1)
{
/* Overcurrent detected on High Side 2 */
/* Clear status bit */
SCUPM->BDRV_ISCLR.bit.HS2_OC_ICLR = 1;
}

if ((BDRV->CTRL1.bit.LS1_DS_STS == 1) && (BDRV->CTRL1.bit.LS1_DCS_EN == 1))
{
/* Short detected on Low Side 1 */
/* Clear status bit */
SCUPM->BDRV_ISCLR.bit.LS1_DS_ICLR = 1;
}
if ((BDRV->CTRL1.bit.HS1_DS_STS == 1) && (BDRV->CTRL1.bit.HS1_DCS_EN == 1))
{
/* Short detected on High Side 1 */
/* Clear status bit */
SCUPM->BDRV_ISCLR.bit.HS1_DS_ICLR = 1;
}
if ((BDRV->CTRL1.bit.LS2_DS_STS == 1) && (BDRV->CTRL1.bit.LS2_DCS_EN == 1))
{
/* Short detected on Low Side 2 */
/* Clear status bit */
SCUPM->BDRV_ISCLR.bit.LS2_DS_ICLR = 1;
}
if ((BDRV->CTRL1.bit.HS2_DS_STS == 1) && (BDRV->CTRL1.bit.HS2_DCS_EN == 1))
{
/* Short detected on High Side 2 */
/* Clear status bit */
SCUPM->BDRV_ISCLR.bit.HS2_DS_ICLR = 1;
}

WDT1_Service();
}

0 Likes

Hello @Raj_C ,
Sorry, but we are able to see the same problem on Evalkit also.
The Evalkit used is : TLE9869 Evalkit.
(Although when we had tried Sample programs on the Evalkit earlier, there was no such issue)
We are trying our original code made for TLE9869(without porting code for other device).

0 Likes
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AmolKoli,

After observing the VS supply waveform we can tell that the ramp-up rate is very slow for VS. You can check with the other power supply or battery with a faster ramp-up rate.

Sometimes, If the 12 V power supply increases slowly, the bridge driver could go into protection mode, since the charge pump under-voltage can be triggered before the supply Vs is stable. One solution is to make the bits DRVx_VCPLO_DIS = 1 and DRVx_VSDLO_DIS = 1. Further VCP_LOWTH2 can be set to lower threshold 0. Alternatively,  disable the interrupts of the bridge driver during module initialization ( NVIC_ISER0.bit.Int_BDRV =0 ). Care must be taken to enable again the interrupts and the bridge protection, once Vs supply is stable.

 

Thank you

Best regards

Raj Chaudhari

0 Likes
AmolKoli
Level 4
Level 4
First solution authored 10 questions asked 50 sign-ins

Hello @Raj_C ,
Thank you for response.
Finally, we could execute the program in Run mode with this solution:
"One solution is to make the bits DRVx_VCPLO_DIS = 1 and DRVx_VSDLO_DIS = 1"
Is it okay to keep using this setting ahead? We would decide on our side too.

Although we would try using other Psupply. But most of the Psupplies used here are of same characteristics.

A great learning though. Thanks again!

0 Likes
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @AmolKoli ,

Glad to hear that it has resolved the issue.

It is not recommended to keep the DRVx_VCPLO_DIS = 1 and DRVx_VSDLO_DIS = 1 after successful start and Vs becomes stable. Please revert the settings back. 

Thank you

Best Regards

Raj Chaudhari