Clock stop in functional mode with wakeup
request disabled (WAKEUPREQEN =0)
- When MCANSS_CLKCTL.STOPREQ bit is set the
clock stop request is asserted at MCAN core input.
- The MCAN module completes any ongoing
communication and asserts the clock stop ack signal at output.
- The clock stop logic in the MCANSS can
use the clock stop ack signal to gate off both HCLK and CCLK to MCAN. MCAN core
sets CCCR.INIT bit to 1 while asserting clock stop ack signal.
- Clock stop ack signal when high sets
MCANSS_CLKSTS.CLKSTOP_ACKSTS bit to 1.
- In this state, MCAN module is fully clock
gated and is not be able to receive any data from RXD pin when
MCANSS_CTRL.WAKEUPREQEN bit is 0.
- Software has to clear
MCANSS_CLKCTL.STOPREQ bit when needed which deasserts the clock stop request
upon which both HCLK and CCLK are ungated to MCAN core.
- Then MCAN core deasserts clock stop ack
signal which is used to clear MCANSS_CLKSTS.CLKSTOP_ACKSTS bit.
- Software can clear CCCR.INIT to 0 when
necessary and put the MCAN module back in operation.
Clock stop in functional mode with
wakeup request enabled (WAKEUPREQEN = 1, AUTOWAKEUP = 0)
- When MCANSS_CLKCTL.STOPREQ is set by
software with MCANSS_CTRL.WAKEUPREQEN = 1 and MCANSS_CTRL.AUTOWAKEUP = 0 then
the clock stop request is asserted.
- MCAN sets CCCR.INIT = 1 once idle and
then provides the clock stop ack signal for gating the HCLK and CCLK.
- Clock stop ack signal when high sets
MCANSS_CLKSTS.CLKSTOP_ACKSTS bit to 1.
- Now when there is any 1 to 0 transition
detected on RXD pin (which is filtered if glitch filter is enabled) while clocks
are gated, MCAN asserts clock stop wake request to MCANSS.
- This signal when high clears
MCANSS_CLKCTL.STOPREQ bit and sets MCANSS_CLKSTS.STOPREQ_HW_OVR bit. The purpose
is to let software know that stop request was cleared due to hardware override
mechanism.
- When clock stop request is deasserted,
HCLK and CCLK are ungated to MCANSS. MCANSS_CLKSTS.CLKSTOP_ACKSTS bit is cleared
once clock stop ack signal is de-asserted from MCANSS.
- MCANSS_CLKSTS.STOPREQ_HW_OVR bit is
cleared by hardware when software sets MCANSS_CLKCTL.STOPREQ bit next time for
module low power state.
- Clock stop wake request can be used to
trigger an interrupt when MCANSS_CLKCTL.WAKE_INT_EN bit is set.
- Software can clear CCCR.INIT to 0 and put
the MCAN module back in operation.
Clock stop in functional mode with
auto wakeup feature enabled (WAKEUPREQEN = 1, AUTOWAKEUP = 1)
- MCAN operation in the case of clock stop
and auto wake up with MCANSS_CTRL.WAKEUPREQEN = 1 and MCANSS_CTRL.AUTOWAKEUP = 1
configuration is similar to MCANSS_CTRL.WAKEUPREQEN = 1 and
MCANSS_CTRL.AUTOWAKEUP = 0 except that CCCR.INIT bit is cleared automatically by
the read-modify-write logic in MCANSS.
- When the clocks are ungated due to clock
stop wake request upon RXD pin activity, MCAN deasserts the clock stop ack
signal and the hardware mechanism in MCANSS clears CCCR.INIT bit when the clock
stop ack signal goes low.
- The CAN bus is a 2-wire differential bus
using non-return-to-zero (NRZ) encoding and has two states:
– Recessive state (logical
1)
– Dominant state
(logical 0)
In idle
state the CAN bus is in Recessive state. The RXD pin activity is considered
when this bus goes to dominant state.
- MCAN module is re-enabled automatically
by hardware in this scenario and there is no need for software to clear the
CCCR.INIT bit.
The wakeup scenarios discussed here are
related to device active or idle modes only and not related to standby mode. In active or
idle modes the HCLK and CCLK are available at the input of CANFD and gated off inside the
module during sleep. When the wakeup condition is received, these clocks are ungated to
resume module operation.
In the case of
standby scenario, we need to take an interrupt from an IOC/GPIO based on Rx falling edge to
wake up the SoC from standby and then reenable clock source like AFOSC and then reconfigure
the CANFD registers before the module is put back in operation. This guideline is same as
how any other serial communication module is handled for standby exit scenario.
Note: There is no retention of CANFD registers so
all register configuration data is lost upon standby entry. CANFD registers have to be
reinitialized after wake from standby before the module is put back in
operation.