lpcware

recovery from bus errors

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by freddyperdok on Tue May 12 07:59:28 MST 2015
Goodday,

I am having a problem with reinitializing my cancontroller when an error has occured. The purpose of my project is for the cancontroller to change its own baudrate when an error occurs. When an error has occured the cancontroller has to be reinitialized and the new baudrate has to used. I want this proces to continue until the right baudrate has been achieved. I am using LPCXpresso and the LPCopen can example program. Also i am using the LPC11C22 on the demoboard (It used to be a LPC11C24 but it got damaged and replaced it with a C22 that we had lying around). I am also using a Peak systems can analyzer. I have edited the program so that when an error occurs on the canbus it will switch to a different baudrate and want it to reinitialize the cancontroller. I copied the code at the top of the main function into the can error interupt.

I am having great trouble in reinitializing the cancontroller. I thought when an error had occured that I could just Reinitialize the controller with a new baudrate. How do I reset my controller after it has gone into an error? (stuff error, BusOff, FormError).

With kind regards,

Freddy

Original Attachment has been moved to: ccan_rom_0.c.zip

Outcomes