C2000 team,
Our customer wants to put the F28069 in a sleep mode and wake on CAN activity. Which interrupts can be expected for wake? Is the WAKEINT triggered or ECAN0_INT0 (INT9.y)?
Thanks,
Darren
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.
C2000 team,
Our customer wants to put the F28069 in a sleep mode and wake on CAN activity. Which interrupts can be expected for wake? Is the WAKEINT triggered or ECAN0_INT0 (INT9.y)?
Thanks,
Darren
Wakeup upon CAN activity is completely local to the eCAN module, so it is the eCAN interrupt that would be triggered. WAKEINT pertains to the device-level powerdown mode. Your query pertains to a powerdown mode that applies only to the eCAN peripheral.
So the Wakeup on CAN is no different than any other type of CAN interrupt?
Answer--> Correct.
I suppose then I have to check in the CAN interrupt handler for the reason for the interrupt and take the appropriate action.
Answer--> Correct.
In this case, wake up the microprocessor from Standby mode? (change LPMCR0.bit.LPM = 0 )
Answer--> No. You cannot use wakeup from CAN in STANDBY mode. This is because all peripheral clocks (including CAN) are turned off automatically in STANDBY mode. You can do this in IDLE mode, provided your code does not turn off clock to the CAN module in IDLE mode.
After return from this wakeup on CAN interrupt, where does the program counter start from? Is it from after a call to
__asm(" IDLE"); ?
Answer--> As explained in the previous post, there are two different Low-power-mode domains. IDLE, STANDBY and HALT are system-level low-power modes and affects the entire chip. The power-down mode you are referring to (initiated by the PDR bit) is completely local to the CAN module. After you power-down the CAN module, code execution from the CPU continues normally. Whereas, with IDLE, STANDBY & HALT modes, after the execution of the IDLE instruction, the CPU is "stopped in its tracks" and remains in this "frozen" state until it is awakened by one of the wakeup methods.
"No. You cannot use wakeup from CAN in STANDBY mode."
The documentation seems to contradict this (pg1108 SPRUGH18G). Also, I was using ESTOP0 to halt the micro (because the toolchain doesn't seem to recognize HALT) and the micro starts up again if there is CAN traffic.
What I am trying to do is get our motor control in lowest possible power mode but still be able to wakeup when the on/off button (another node on the CANbus) is pressed.
So I suspect that if HALT (or ESTOP0) is used all clocks will stop (maybe the xtal osc is still running) and this should be my lowest power mode and I don't need to play with LPMCR0.bit.LPM = 0 at all.
Tom,
As I explained in my previous post, there is a low-power mode that is completely local to the eCAN module. This is activated by setting PDR=1. (Rest of the chip continues to function normally). The CAN module can automatically wake-up upon seeing CAN traffic. You could save about 2.5 mA by doing this, as shown in Table 5-2 of SPRS698F. Not much.
If you want to achieve lower power and be able to wakeup upon CAN bus activity, you could use the IDLE mode on the device. This would freeze the CPU. You could turn off the clock to all the peripherals except CAN. Upon receiving a frame, the CAN module asserts an interrupt to the CPU, waking it up in the process.
STANDBY or HALT mode turns off the clock to all the peripherals. If you want to achieve the lowest possible power and still be able to wakeup upon CAN bus activity, you could use the HALT mode. Use GPIOLPMSEL register and configure GPIO30 for wakeup. (You may have to configure GPIO30 for GPIO operation. You could switch to CAN operation after wakeup). After device enters HALT mode, activity on GPIO30 should wake it up, provided that activity meets the minimum pulse width specified in the datasheet for wakeup signals.
Please point out the contradiction in the documentation (section #, line # etc)