|
Bus-off в sja1000, Прекращается передача данных при срабатывании Bus-off |
|
|
|
Mar 4 2011, 12:26
|
Участник

Группа: Участник
Сообщений: 70
Регистрация: 5-04-07
Из: Санкт-Петербург
Пользователь №: 26 789

|
Пишу драйвер под QNX4. Возникла проблема, когда сеть рвется (выпал разъем) – срабатывает прерывание и устройство входит в режим Buss-off - данные принимает, но послать ничего не может. Помогает только перегрузка ПС. Вопрос таков: Как вернуться в нормальный режим после образования сети вновь?
С уважением, Дейнека Дмитрий
|
|
|
|
|
 |
Ответов
(1 - 6)
|
Mar 5 2011, 06:58
|
Участник

Группа: Участник
Сообщений: 70
Регистрация: 5-04-07
Из: Санкт-Петербург
Пользователь №: 26 789

|
Цитата(Andy Mozzhevilov @ Mar 5 2011, 09:31)  Что-то странное пишите. Если разъем выпал, CAN контроллер переходит в error-passive. Если после этого разъем вставить и появится сеть, контроллер автоматически перейдет в error-active после одной или нескольких успешных передач. В bus-off контроллер может перейти при каких-то фатальных ошибках на шине (несоответствие скоростей узлов, возможно КЗ линии или какие-то помехи в ней). Есть контроллеры, которые требуют, чтобы из bus-off их вытолкнули программно, есть такие, которые могут выходить автоматически по состоянию линии CAN. В документации на ваш контроллер почитайте по этому поводу. Это мне понятно. Вопрос именно по чипу SJA1000 - программно не получается выйтииз buss-off.
|
|
|
|
|
Mar 5 2011, 07:16
|

Знающий
   
Группа: Свой
Сообщений: 877
Регистрация: 26-01-05
Из: Екатеринбург
Пользователь №: 2 206

|
For register access, two different modes have to be distinguished: · Reset mode · Operating mode. The reset mode (see Table 3, control register, bit Reset Request) is entered automatically after a hardware reset or when the controller enters the bus-off state (see Table 5, status register, bit Bus Status). The operating mode is activated by resetting of the reset request bit in the control register
When the transmit error counter exceeds the limit of 255 [the bus status bit is set to logic 1 (bus-off)] the CAN controller will set the reset request bit to logic 1 (present) and an error interrupt is generated, if enabled. It will stay in this mode until the CPU clears the reset request bit. Once this is completed the CAN controller will wait the minimum protocol-defined time (128 occurrences of the bus-free signal). After that the bus status bit is cleared (bus-on), the error status bit is set to logic 0 (ok), the error counters are reset and an error interrupt is generated, if enabled.
--------------------
Пасу котов...
|
|
|
|
|
Mar 5 2011, 12:11
|
Участник

Группа: Участник
Сообщений: 70
Регистрация: 5-04-07
Из: Санкт-Петербург
Пользователь №: 26 789

|
Цитата(Andy Mozzhevilov @ Mar 5 2011, 10:16)  For register access, two different modes have to be distinguished: · Reset mode · Operating mode. The reset mode (see Table 3, control register, bit Reset Request) is entered automatically after a hardware reset or when the controller enters the bus-off state (see Table 5, status register, bit Bus Status). The operating mode is activated by resetting of the reset request bit in the control register
When the transmit error counter exceeds the limit of 255 [the bus status bit is set to logic 1 (bus-off)] the CAN controller will set the reset request bit to logic 1 (present) and an error interrupt is generated, if enabled. It will stay in this mode until the CPU clears the reset request bit. Once this is completed the CAN controller will wait the minimum protocol-defined time (128 occurrences of the bus-free signal). After that the bus status bit is cleared (bus-on), the error status bit is set to logic 0 (ok), the error counters are reset and an error interrupt is generated, if enabled. Да счетчик ошибок увеличивается и когда доходит до 255 чип вырубается и потом никак его не реанимировать, сам он не запускается.
|
|
|
|
|
  |
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0
|
|
|