Im having issues debugging and measuring the MCU current consumption

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Im having issues debugging and measuring the MCU current consumption

634 Views
fernandotrujill
Contributor I

I am currently using the KDS version 3.2.0, and I am having issues when trying to debug my code: sometimes when I run the debug environment it goes straight into running when it should start at a stop to be able to go through every line from the get go if I wish so; the functions "jump into" or "jump over" and overall those tools utilized to go step by step in your code, I can't really use them, when I try them it goes straight into running mode or it just ignores it, its only worked a few times but overall its really inconsistent and can't debug any code.

I am not sure if it has something to do with my environment, I downloaded KDS from the NXP page, installed it, and verified if their were any available updates, and that's it. Is there anything I missed doing to properly install all the environment?

 

On the other hand, I am utilizing a FRDM-KL05Z, and I am trying low power modes and I would like to measure its current, taking advantage of J4 and removing R27. Doing this, if there is no header connecting J4 there should be no voltage on P3V3_MCU, but there is, and the MCU gets powered, and I've been looking though the schematic and I can't really find where this power comes from, so I can't really measure the MCU's current, and overall its really disturbing and it should be an error that P3V3_MCU has a voltage even when J4 is nor connected and R27 has been removed, if not, whats the point for this header.

 

Anyway, thank you. Hopefully someone can help me out on either problem.

Labels (1)
0 Kudos
4 Replies

482 Views
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

Hi Fernando,

1) The problem is caused by a 2 hardware breakpoint limitation of some  devices and the fact that the temp breakpoints do not get cleared by a CDT layer when the session is restarted/terminated. 

We are looking into this report to see if P&E plugin can control removing the breakpoints from the CDT layer or adding support for software breakpoint to resolve a two breakpoint limitation. 

In the meantime, as a workaround there are two things that the user can do:

  1. Use terminate button and debug button to end and start a new debug session. In this case the temp breakpoints are not being added to the list.
  2. Go to breakpoints tab and disable/erase existing breakpoints before doing a session restart. 

2)what we saw is that the MCU is getting voltage from the K20 there is a thread in community that explains how is this happening and help you to understand what’s going on.

Regards

Have a Nice day.

Jonathan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

482 Views
fernandotrujill
Contributor I

Thank you for your response.

It seems that on the FRDM-KL25 this doesn't happens, and the MCU is fully

powered OFF as it should be expected, so this is probably a design error

for the FRDM-KL05, because whats the point of having its own P3V3_MCU power

net if it can't be controlled or isolated for the rest of the power.

Also, if I work under these conditions the board will probably get damaged,

due to being working under an abnormal behavior, as it happened already

once with a FRDM-KL05 board.

Either way, I still tried to measure current from J4 and I can't get any

reading. So I guess our better option will be to use the FRDM-KL25 for

testing these low power modes, but it won't be optimal, because our project

is going to utilize a KL05 MCU.

If you can come up with something else, please let me know.

Have a great day.

Fernando Trujillo

Embedded Systems Design Engineer

@Nacuri

On Thu, Oct 6, 2016 at 5:17 PM, jonathaniglesias <

0 Kudos

482 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Fernando,

1. About "run into"  and  "run over" , you said few times it work , other time can't ,

what about your project, i need test on your project .

2. Yes, when cut the R27 , also not connect J4, the VDD pin of MCU also have voltage ,

it passed from other pins of MCU,  for the mcu connected to some other ports .

If we cut all of the pins the mcu connected , it also said do not connect the MCU to

any other power, the VDD will be 0 .

While it doesn't matter , it does not interface you measure the current.

Yes , the method you measure current is right .

Hope it helps


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

482 Views
fernandotrujill
Contributor I

Hi Alice, thank you for your answer.

1) Would you want me to send my code/project to you? I've tried different codes/projects, and my debug experience is awful, sometimes not being able to debug at all, and sometimes being really inconsistent, FE: trying to use "jump into" goes to running mode, or goes somewhere into the code that I can't find, and sometimes it freezes. Using Codewarrior I was always able to debug pretty well, using this functions, being able to test my code line by line and being able to see the registers change accordingly, but this is currently impossible.

2) I have looked into the FRDM-KL05Z schematic and as far as I'm concerned the MCU only draws its power from this J4 or R27 if its connected, so when all of this is disconnected and I can still see a voltage in the VDD pin of the MCU and that its turned ON, makes me think that it is a design problem, and makes me doubt that the current measurement won't be accurate.

0 Kudos