CAN 2.0B frames on NetDCUA5/WCE6 received as 2.0A frames in reception.

  • Hello,


    We are now testing a unit of NetDCUA5/WCE6 core, and it has the latest updates availaible:
    Nboot(1.1) Eboot(11) and WinCE6 kernel v1.09


    We are testing again CAN interface and we see exactly the same problem described in this thread (but with ARMstoneA9 cpu):


    CAN 2.0B frames on ARMstoneA9/WEC7 received as 2.0A frames in reception.


    IN summary, we are sending 29bits frames (CAN 2.0B) but they seems to be transmited as 11bits frames (CAN 2.0A) by the CPU.


    Can you confirm if current NetDCUA5 CAN driver for WinCE6 suffers from the same problem? we would need and update then as soon as possible for continue testing the unit.


    Thanks.

  • Hello


    attached the driver which resolves the issue. It will be included into the next kernel release.

    Files

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

    Edited 4 times, last by fs-support_AD ().

  • Hello,


    After testing the drivers is does not work in my current NetDCUA5.
    I have copied it in \FFSDISK\ ad then in register I have change only path to it:
    \HKLM\Drivers\BuiltIn\NetDCUA5\CAN1\ key "dll" from "fs_candrv.dll" to " \FFSDISK\fs_candrv.dll"
    and same for CAN2.
    Then after reboot, CPU does not receive and transmit any CAN frame. If I return to older path in register, at least it receive frames and send STD ones...


    Is it the correct one driver for NetDCUA5?
    Is neccesary to modify another parameter/s in the register ?


    Thanks

  • Looks like the driver is not loaded at all!


    You are sure that there is no spelling error?
    If you specify "Debug=255" any "CID" output on the serial debug line?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,
    with default driver, in serial debug appears:
    ....
    CID: Version 2.4, ActiveKey = Drivers\Active\19
    CID: Version 2.4, ActiveKey = Drivers\Active\20
    ....


    But when I point to the new driver in \FSSDISK\ in the register and then reboot, none of this 2 lines about CID appears ... seems the new CAN driver is not loaded...I dont know why (no spelling errors).

  • Hello,


    can you rename the new CAN driver on FFDISK. (e.g. fs_candrv_new.dll) Then change the registry entry "Dll" to new driver name. (without prefix "\FFSDISK\")

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • I have tried to rename dll and use without prefix "\FFSDISK\" and later with prefix again, and in both cases seems driver is not loaded.
    Its very strange, when I received the CAN dll file for the other CPU ArmStoneA9/WCE7 it worked inmediatly only modifying the path in the register.
    I dont know why same procedure does not work here.
    One solution is to release a WinCE 6 beta kernel for NetDCUA5 with this driver inside in the next days.
    The current WinCE6 core kernel is including CF3.5, will be a kernel release for this CPU including CF2.0 ?

  • Hello,


    sorry i made the previos driver for wrong platform. New driver should be worked.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Thanks,
    It works now, it's loaded while booting and I can receive and transmit EXT frames.
    But in debug serial it shows:
    ....
    CID: CID_IOControl(0x8007202c) failed, error=1460
    ....
    continously with every CAN frame received or trasmited, is it normal ??

  • Thanks.
    This message means that by waiting for next read event timeout occurs, because no events are available. This message will removed by next driver release. New driver is available now.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,
    testing again the CAN driver we see we are not able to receive STD and EXT frames from same CAN network. In this network there are devices which transmit EXT and another transmiting STD frames with same baudrate (100kbps), and NetDCU must be able to listen both on same CAN port.
    We are using .NET and dll CAN wrapper from F&S that we used previously with NetDCU10 and later with NetDCU14.
    Can you tell me how to configure in C# the CAN port to be able to receive both kind of frames ? or it's a driver problem yet ?
    We always configure the CAN port in this way with dll wrapper:


    -------------------------------------------------------------------------------------------------------------
    pCAN1_CCS = new CanPort("CID1:", CanPort.CanAccess.READ_WRITE);
    pCAN1_CCS.ReadProperties(out CANprop1_CCS);
    pCAN1_CCS.SetCanMode(CanPort.CanMode.CAN_2_0_B);
    pCAN1_CCS.SetBaudrate(CANbaudrate1_CCS);


    //pCAN1_CCS.SetDefaultFrameFormat(CanPort.CanTransmitFormat.STANDARD); //11bits
    pCAN1_CCS.SetDefaultFrameFormat(CanPort.CanTransmitFormat.EXTENDED); //11 or 29 bits


    pCAN1_CCS.HandleErrorsViaReturn(true);

    pCAN1_CCS.ReadAcceptanceFilter(out CANfilter1_CCS);
    CANfilter1_CCS.code = 0;
    CANfilter1_CCS.mask = 0xFFFFFFFF; //to allow all messages
    pCAN1_CCS.WriteAcceptanceFilter(ref CANfilter1_CCS);

    pCAN1_CCS.GetCommMask(out CANmask1_CCS);
    CANmask1_CCS = CanPort.CanEventFlags.CANBUS_ALL;
    pCAN1_CCS.SetCommMask(CANmask1_CCS);


    pCAN1_CCS.Init();
    -------------------------------------------------------------------------------------------------------------


    Modifying bold lines we are able to receive STD or EXT in NetDCUA5, but never both simultaneouly.
    What can be done ??

  • Hello,


    you can find detailed information about CAN in our CAN driver documentation. (https://www.fs-net.de/assets/d…/WINCE_CAN_DOTNET_eng.pdf) In chapter "Sample Program Read" is a source code sample for receiving messages.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,
    this will not solve the problem... we have this document from several years ago...
    The problem is very clear, with our configuration code (previous post) we are able to receive CAN frames in STD and in EXT format in the same network with CPUs like NetDCU10 and NetDCU14 (this one with some issues too).
    Then, executing same CAN configuration code on NetDCUA5, which CAN driver is recently working, it is not able to receive both kind of frames simultaneously.
    Can you try to reproduce this behaviour and see if there is any can driver problem yet for NetDCUA5 CPU, or tell us what can be wrong in the previous code configuration for not receiving both kind of CAN frames?

  • Hello,


    i cann't reproduce described behaviour. I use CANCheck tool to receive extended and standard messages from 2 CAN devices and it works fine for me. Can you probaly do same test with CANCheck tool.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • I have several questions:
    -Do you configure CAN port with CANCheck tool in any special way for supporting both kind of frames in reception?
    -Do you change this configuration for receiving i.e. EXT and then change again for receiving STD, or with an unique configuration flags you can receive both? (because changing configuration we are able to receive both too, but we need to receive both with a unique configuration of CAN port in order to distinguish which frame received is EXT and which one is STD).
    If it's not neccesary to reconfigure CAN port by CANCheck tool for receiving both EXT and STD, then we assume driver CAN is OK, but then we return to the beggining of our quetions:
    -CANCheck is not programmed with .NET and does not use F&S CAN wrapper dll, then the problem could be there...can you then try to use in a .Net project your CAN dll wrapper and try to see if with any combination of CAN flag configuration are you able to receive both kind of frames simultaneoulsy ??

  • Hello,


    Quote

    -Do you configure CAN port with CANCheck tool in any special way for supporting both kind of frames in reception?


    No, i used extended mode.



    Quote

    -Do you change this configuration for receiving i.e. EXT and then change again for receiving STD, or with an unique configuration flags you can receive both? (because changing configuration we are able to receive both too, but we need to receive both with a unique configuration of CAN port in order to distinguish which frame received is EXT and which one is STD).


    You can receive both message formats if your receiver device configured in extended mode.



    Quote

    -CANCheck is not programmed with .NET and does not use F&S CAN wrapper dll, then the problem could be there...can you then try to use in a .Net project your CAN dll wrapper and try to see if with any combination of CAN flag configuration are you able to receive both kind of frames simultaneoulsy ??


    I tested it with CAN wrapper dll and had same result. It works fine for me.



    I think, it would be easier if you can send me your test application and describe your environment exatly (maybe with a diagram).
    Probably i don't understand you test environment in details.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

    Edited once, last by fs-support_AD ().

  • I will test it today again.
    Independent of our test application and our enviroment details, the reason of this post was that 2 weeks ago, the CAN driver of the NetDCUA5 was not able to transmiting EXT frames, and after new version, it's able of it.
    But, then our question is, using our application programmed in .Net and our network CAN enviroment, why using an older NetDCU10 we are able to receive both format frames without problems, and replacing it by a new NetDCUA5 executing exactly same .Net application (so using the CID1 CAN port configuration as described before) and using same network CAN enviroment, this CPU is not able to receive STD frames in this case only EXT. ?

  • Hello,


    that can be many reasions. One can be differt test enviroment.
    I don't rule out possibility that a problem is in the driver or DLL, but currently i cann't reproduce the behaviour of your test enviroment. So i think it would more effiecent if you would give me more details. (source code of your application, exatly description of your test evniroment)

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Of course if you set the driver to extended mode (CAN 2.0B), both types of messages should be possible to receive, without having to switch the mode at runtime.


    CAN on NetDCU8 and NetDCU10 was a version 1.x driver. CAN on NetDCU14 and NetDCUA5 is a V2.x driver. Here some new registry settings were added. Especially the value "Align" could be of interest here. This tells the driver on which bits of the 32-bit word the values for the IDs in messages and acceptance filters are located. So maybe a wrong or missing setting of "Align" will make your existing application fail because the IDs are interpreted wrongly by the driver. Please see the documentation of the C CAN driver for a description of the "Align" value.


    A second value that might have influence is the "MaskActive" value. This value tells the driver whether a 0 or a 1 bit in the mask value of the acceptance filter denotes an unchecked bit (always accepted). Again a wrong value here may result in the wrong behavior of the acceptance filter.


    And one other thing: The feature of the NetDCU8/10, that also the first two data bytes can take part in the acceptance filter was a special feature of the CAN controller there. It is not a standard CAN feature and neither the CAN controller of the NetDCU14 nor of the NetDCUA5 is capable of doing this. So this feature can not be supported on these boards.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.