Luotao Fu wrote:
> Hi,
> I made a patch which solves this issue. Actually the controller got stuck
> already while calling mscan_set_mode(dev, MSCAN_INIT_MODE). Since the return
> value is not checked there. The error is not catched. I now simple switch the
> order of SLPRQ and INITRQ. It actually solve the prolbem. I'm however still
> wondering why the driver calls SLPRQ first, didn't find any hint in the
> datasheet about in which order the both states are supposed to be set. Please
> review and test on your setup if possible.
The manual says in "19.7.8.5 MSCAN Initialization Mode" that sleep mode
should be entered first:
------------------
NOTE
The user is responsible for ensuring that the MSCAN is not active when
Initialization Mode is entered. The recommended procedure is to bring the
MSCAN into Sleep Mode (SLPRQ=1 and SLPAK=1) before setting the
INITRQ bit in the CANCTL0 register. Otherwise the abort of an ongoing
message can cause an error condition and can have an impact on the other
bus devices.
-------------------
Wolfgang.
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users