Tip/semi-bug for setting CAN Acceptance Filter using CMSIS function "CAN_SetupAFLUT"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Tip/semi-bug for setting CAN Acceptance Filter using CMSIS function "CAN_SetupAFLUT"

359 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wlamers on Tue Nov 06 08:58:47 MST 2012
Dear all,

While debugging a rather large program I discoverd an annoying semi-bug. This can probably not be called a real bug since it depends on the usage case. In my case the program resulted in a hard-fault. This is tested on a LPC1769 and a LPC1778 both using the newest CMSIS driver's found here on LPCware.

If one is using the CMSIS function "CAN_SetupAFLUT" to set the CAN acceptance filter values in RAM and you want to change the contents of the acceptance filter structure (the one that is passed to the argument pointer of the function) during run time (e.g. by reading in a new file from an SD card). Then you should be aware that the "CAN_SetupAFLUT" function is changing the value's of the structure pointers. This is implemented with de-referencing the pointer using "AFSection->SFF_Sec = ..." etc.

You should manually restore the pointer value's (memory adresses) and also the counter variables "CANAF_std_cnt" etc.

Just that you know... Hopefully this is helpfull to somebody.


Best regards,

W.Lamers
Labels (1)
0 Kudos
1 Reply

342 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Lien.Nguyen on Tue Nov 06 20:12:26 MST 2012
Hi Lamers,
I think it is a bug and must be fixed. Thanks for your comment.

Best Regards,
Lien
0 Kudos