lpcware

CAN acceptance filter with one entry

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by wlamers on Wed Apr 03 11:47:12 MST 2013

I am facing a weird problem with the CAN acceptance filter of a LPC1778 (again...)


 


Let's sketch the situation first.


I load the acceptance filter RAM with only Standard Frame Format id's using the (slightly modified) NXP driver library functions (CAN_SetupAFLUT).


If I load 2 or more ID's all works well (uneven number of ID's, e.g. 3, works well also).


But when I load only one ID, the acceptance filter doesn't do anything. The LUTERR bit in the LUT Error rigister (at 0x4003 C01C) is set also for a short period of time, just after changing the acceprtance filter mode back to Normal. This indicates a problem in the settings. Strangely enough the error disappears immediatly after excecuting the next instruction.


 


Since the manual states that the AFRAM is only word adressable and that the ENDOFTABLE register is set to word aligned adresses I assume when I set only one ID (half word) the second half word is seen as an ID entry also. Note that the disabled bit (in the second entry) is set to zero (meaning enabled).And the ID in this slot equals just 0. Just because the whole second half word is zero. This is a violating of ascending order (causing the error and not working acceptance filter?).


Following this idea, one expects problems at every unequal number of ID's. But thats is not the case! All uneven numbers (except 1) work perfectly!


 


At this point I am lost completely. Nor the manual, internet forums and hours of debugging can give me any clue. But you would expect that many people came across this problem also. E.g. during testing you often set just one ID in the acceptance filter.


 


Can anybody comprehend and explain what is going on?


Outcomes