OpenCores
Issue List
Error in recovery from BUSOFF #16
Open ocghost opened this issue over 15 years ago
ocghost commented over 15 years ago

In can_bsp.v there is an error:

present: assign error_status = extended_mode? ((rx_err_cnt >= error_warning_limit) | (tx_err_cnt >= error_warning_limit)) : ((rx_err_cnt >= 9'd96) | (tx_err_cnt >= 9'd96));

must be: assign error_status = extended_mode? ((rx_err_cnt >= error_warning_limit) | (tx_err_cnt >= error_warning_limit) | node_bus_off) : ((rx_err_cnt >= 9'd96) | (tx_err_cnt >= 9'd96) | node_bus_off);

It affects on recovery from BUSOFF: in BUSOFF, when error status bit is cleared (by counting down tx_err_cnt to value=95), error warning interrupt is generated, but clear of error status bit in accordance to SJA1000 datasheet must be done after recovery from BUSOFF, not in BUSOFF.


Assignee
No one
Labels
Bug