This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
We would like to put the device into low power down mode, we used the IDLE mode and wakeup using CAN messages. This scheme is working OK.
But we need to further lower down the current so need to put the device is in STANDBY or HALT mode but need to wakeup on CAN messages. How to do this?
Is any one used STANDBY or HALT mode with CAN message as wakeup?
Please provide the suggestions. We need the solution as soon as possible.
Best Regards,
Pandurang Khutal
Pandurang,
Looking at your current numbers, it doesn’t appear you are entering the low-power mode at all.
Some bits/registers pertaining to LPM are EALLOW protected. It is conceivable that EALLOW has been inadvertently turned off elsewhere in the code. Until your debug is complete, please comment all EDIS instructions.
With the debugger connected, check if LPMCR0 register is written with the correct value before you execute the IDLE instruction. In fact, you should step through the code with the debugger connected to ensure that the code is working the way it should. For example, does it actually jump to RAM to execute the flash power-down function and IDLE instruction?
Please run the Example_2806xHaltWake project in C2000ware "as is" and see what current numbers you get. If you use that code as a reference, you should be able to easily figure out what is wrong with your code. It will also tell you the numbers to expect on your own hardware. Also, does your hardware have the provision to measure the current that only goes into your MCU? In other words, could the current you are measuring be going to some other components on the board as well?
If you are using a series resistor for current measurement (to leverage Ohm's law), be very careful with the value you choose. It would be tempting to choose a high-value resistor to get a measurable voltage-drop (since the HALT mode currents are in the uA realm). However, such a resistor could also "current-starve" the core during power-up and put the device in an undefined state. Considering your current numbers are the same across all 3 LPMs, I suspect this is what is happening. It is likely your code is not getting executed at all. This is the reason I want you to step through your code with the debugger connected.
No need to disable peripheral clocks in STANDBY or HALT mode through code. That is done automatically in the design.
You get that error only after the successful execution of the IDLE instruction.
Did you follow my suggestion to run the example code from C2000ware? This step is very important.
Not a good idea to rely on the display in the power supply when your current is in the uA realm. Please use a bench-top mulimeter that has good accuracy in the uA realm.
Hi Hareesh,
As per your suggestion I have used the multimeter and measured the current in all three modes. these currents are below.
IDLE sleep mode current 40mA
STANDBY sleep mode current 29mA
HALT sleep mode current 26mA
By running the LMP code from RAM I able to put the device into HALT mode but it is not wakeup on can message. Can you please check with above code what is crating an issue?
I checked in STANDBY mode the device is wokeup on CAN message properly and same logic I used for HALT mode to wakeup but it is not waking up.
Thanks,
Pandurang Khutal
Pandurang,
Your HALT mode current of 26mA does not look correct. Either the device is not in HALT mode or your meter reading is incorrect. Is this with the example code from C2000ware? Please confirm this. As stated before, measuring currents in the uA realm is very tricky. If the meter doesn’t have sufficient resolution/accuracy, you could get an erroneous reading. Bear in mind that you get the best accuracy in the lowest possible range. When you start your code, you are in the "operational" mode of the MCU, where 100mA range is appropriate, but in HALT mode, 10mA range is appropriate. Again, when you wake up from HALT mode, you are back in operational mode. The meter you are using should have excellent auto-ranging capabilities to switch the ranges seamlessly without interrupting power to (or current-starving) the MCU. We use a 6 1/2 digit multimeter in the lab. What is the make/model number of the multimeter you are using?
How do you ensure you are only measuring current going into the MCU? Which rail (Vdd or Vddio) are we talking about? Do you use the on-chip VREG?
Conduct your "HALT mode wakeup using CAN" tests without connecting any multimeter. Once you get this flow working, bring the multimeter into the experiment.
Have you ensured that the minimum pulse-width requirements for the HALT-mode wakeup signal (as shown in the datasheet) has been met? Could you provide a scope capture of the wakeup signal?
What is the CAN bit-rate?
What clock source are you using?
Could you share the schematics of your board with me privately?
To summarize, this is the debug sequence I would like you to follow:
Hi Hareesh,
I have tried with the example code from C2000ware and the current which takes is @26mA is the same. For measuring the current we are using TENMA 72-7720 multimeter.
We have not used the on chip VREG. We are measuring the overall current of the board not the Vdd and Vddio.
For wakeup we tried without having the multimeter in series with the supply which goes to the board but still the controller is not wakeup. The CAN bit rate is 250KBPS. We are using the external OSC as the clock source with PLL enable and core frequency is 90MHz.
As per the datasheet XCLKOUT output is disabled by default in HALT mode. In the standby mode controller is wakeup properly.
One observation is that, we are using the CAN transceiver from TI-CAN1042HVDRQ1 and it has the standby pin as a control pin. What is the status of the pins once controller enters into HALT mode. The pins status will maintain or it will goes to tristate?
The board which we have now do not have the provision to monitor the Vdd and Vddio cureent directly. The supply which goes to the board is 12V and from that using LDO we have generated the 3.3V which goes to the microcontroller. We are measuring the current by putting the multimeter is series with 12V power supply.
The issue is the controller is not wakeup in HALT mode by using CAN message. But with the same logic the controller is wakeup in standby mode. Please suggest.
Thanks,
Pandurang Khutal
Pandurang,
As already mentioned, you need to use a bench-top multimeter with 6 1/2 digits for HALT mode currents.
You should not measure the overall current of the board for HALT. You must measure only the current going into VDD and VDDIO rails. It is likely other components on the board are contributing to this 26 mA, as Mark mentioned. If you have a series ferrite bead for the MCU rails, you could remove them and insert the multimeter there at that point.
Regarding the transceiver, the GPIO pins indeed keep their state in HALT. For wakeup, did you measure the pulse width at CANRX pin?
Hi Hareesh,
As per the our discussion, we have modified the code and tested on the board but still we are not able to wakup the controller from HALT mode via CAN message.
I did change for wake source instead of wakeup on CAN message i used the GPIO pin 27 as wakeup source and it is wakup properly from HALT mode.
Can you please suggest why it is not wakeup from CAN message?
Thanks,
Pandurang Khutal