CAN Acceptance filter edit

  • I configured my can bus with the program CanCheck2013.exe on the armStoneA5.
    now from my application I want to change this CAN settings.
    I can read and write the baudrate and read how the acceptance filter is set.
    but when I want to change the acceptance filter the acceptance filter code and mask value are set to zero (0)
    I use the example that is written in the WINCE_CanInterface_eng.pdf (page. 71)


    How can I change the acceptance filter for the CAN bus?

  • Hello,


    please refer the roadmap in our SW download area. The CAN driver has still a bug (ID2102). So i assume when you reverse the bit order (of the dword) it may "work".

    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.

  • If I reverse the bit order then this value is stored into the acceptance filter. (but still not work)
    My goal is read only the addresse 0x100 to 0x10F
    so the values for code and mask are:
    CODE: 0x00000100
    MASK: 0x0000000F
    (after writing this values code and mask are both 0)


    when I reverse the bitorder then code and mask are:
    CODE: 0x00800000
    MASK: 0xF0000000
    (after writing this values code = 0x800000 and mask = 0xFFFFFFF)


    With values I have to use for CODE and MASK to set the acceptance filter?

  • Ok sorry, the situation seems to be an other one. While my first check i just reverse mask and set all bits high so i am lead myself to a wrong assumption:(.


    I check again and it seems like a word swap and shifted nine bit to left is the error. Don't ask how such an error is caused, i did not analyse soure code until now - but we will rework driver asp - latest for the next kernel revision.


    So for
    CODE: 0x00000100
    MASK: 0x0000000F
    you have to set
    CODE: 0x20000000
    MASK: 0x01E00000
    I used can-check-tool for test and error traceing by receive messages with only one bit set(0x1, 0x2, 0x4, 0x8, 0x10, ... 0x200).

    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.

  • Sorry again,
    everything seems to be right. Please read the documentation again. For Drivers 2.x we have to set the "align" value if we want to have the same notation as for V1.x Drivers:


    if i set hhese value it works as expected

    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.

  • Please use "ndcucfg":

    Code
    1. reg open \drivers\builtin\netdcua5\can1
    2. reg set value Format dword 1
    3. reg set value Align dword 1
    4. reg save
    5. reboot

    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.