recovery from bus errors

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

recovery from bus errors

475 Views
lpcware
NXP Employee
NXP Employee
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

Labels (1)
0 Kudos
1 Reply

367 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue May 12 09:56:35 MST 2015

Quote: freddyperdok
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.



Correct, in your case: EPASS  :)

And you should switch to Silent mode to avoid error frames  :O 



0 Kudos