Помощь - Поиск - Пользователи - Календарь
Полная версия этой страницы: LPC21xx: CAN Sleep Mode
Форум разработчиков электроники ELECTRONIX.ru > Микроконтроллеры (MCs) > ARM
baddream
Вопрос следующий: пробуждение CAN-контроллера, находящегося в sleep-режиме происходит при появлении активности на шине, происходит ли при этом прерывание приема и принимается ли сообщение или контроллер пропускает это сообщение и начинает прием только со следующего?
Alex03
Цитата(baddream @ Feb 6 2007, 14:02) *
Вопрос следующий: пробуждение CAN-контроллера, находящегося в sleep-режиме происходит при появлении активности на шине, происходит ли при этом прерывание приема и принимается ли сообщение или контроллер пропускает это сообщение и начинает прием только со следующего?


Там ж всё написано:
Цитата
Sleep Mode
The CAN Controller will enter sleep mode if the SM bit in the CAN Mode register is 1, no CAN interrupt is pending, and there is no activity on the CAN bus. Software can only set SM when RM in the CAN Mode register is 0; it can also set the WUIE bit in the CAN Interrupt Enable register to enable an interrupt on any wake-up condition.
The CAN Controller wakes up (and sets WUI in the CAN Interrupt register if WUIE in the CAN Interrupt Enable register is 1) in response to a) a dominant bit on the CAN bus, or cool.gif software clearing SM in the CAN Mode register. A sleeping CAN Controller, that wakes up in response to bus activity, is not able to receive an initial message, until after it detects Bus_Free (11 consecutive recessive bits). If an interrupt is pending or the CAN bus is active when software sets SM, the wakeup is immediate.

ИМХО тут есть один нюанс. smile.gif Если у Вас всего 2 девайса на шине, то передающий девайс пошлёт дубль по факту ошибочной передачи первого пакета (т.к. у него подтверждения приёма не будет). Т.е. на первый пакет просыпаетесь, второй принимаете. smile.gif

Сам я слип не пользовал, но надеюсь Вы читали errata про CAN, и в частности вот это:
Цитата
CAN.1 CAN bus activity does not wake from powerdown mode

Introduction: The CAN interface may be configured such that activity on the CAN bus lines will wake the part from power-down mode.

Problem: CAN bus activity fails to wake the part from power-down.

Work-around: CAN bus pins may be tied to external interrupt inputs which will wake the part from power-down.


CAN.2 No wake up from CAN sleep mode using SM bit

Introduction: The CAN Controller will enter sleep mode if the SM bit in the CAN Mode register is set to 1, no CAN interrupt is pending, and there is no activity on the CAN bus. The CAN Controller wakes up (and sets the WUI bit in the CAN Interrupt register if the WUIE bit in the CAN Interrupt Enable register is set to 1), in response to a dominant bit on the CAN bus or software clearing the SM bit in the CAN Mode register.

Problem: Clearing the SM bit does not cause the CAN module to wakeup from CAN sleep mode.

Work-around: None, the SM bit cannot be used as a source of CAN wakeup.
Для просмотра полной версии этой страницы, пожалуйста, пройдите по ссылке.
Invision Power Board © 2001-2025 Invision Power Services, Inc.