LPC1788 don't start when CAN messeges comes

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

LPC1788 don't start when CAN messeges comes

641 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Tue Jul 03 00:51:59 MST 2012
Hello! I made an application for LPC1788 that works with others devises on CAN bus. It works fine when LPC1788 turn on first and there is no frames on CAN bus. But if some other devises start to send messages first LPC1788 stay on reset mode. Could somebody explain  to me how to fix this?
Regards Vasilij.
0 Kudos
Reply
9 Replies

602 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Polux rsv on Tue Jul 03 06:26:28 MST 2012
It should have started to finish in the hardfault handler.
Have tried to step from reset, instead from main ?

What about power supply affected by transceiver bad decoupling ?

Angelo
0 Kudos
Reply

602 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Tue Jul 03 05:24:52 MST 2012

Quote: Polux rsv
Just my 2 cents.
1. setup acceptance filter
2.clear any pending interrupt due to messages arrived during "boot".
3.enable interrupts.

put a breakpoint in your init_can and single step to check in wich part the hardfault occurs.

Angelo



Program don't start at all, when CAN messages on bus.
0 Kudos
Reply

602 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Polux rsv on Tue Jul 03 04:52:17 MST 2012
Just my 2 cents.
1. setup acceptance filter
2.clear any pending interrupt due to messages arrived during "boot".
3.enable interrupts.

put a breakpoint in your init_can and single step to check in wich part the hardfault occurs.

Angelo
0 Kudos
Reply

602 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Tue Jul 03 03:54:39 MST 2012

Quote: researchinnovation
Hi...Yanvasilij!!!

What Error on the console ....??
Does HardFault_Handler error come when you run the code or when you debug it step by step?


http://support.code-red-tech.com/CodeRedWiki/DebugHardFault
http://infocenter.arm.com/help/topic...043C_rtabi.pdf
http://support.code-red-tech.com/CodeRedWiki/ArmCpuInfo
http://infocenter.arm.com/help/topic...043C_rtabi.pdf

Can you share your code in zip form??

Thanks & Regards.....:)



Both of there. On the beginig. I am debugging from Keil, there is no any console
0 Kudos
Reply

602 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Tue Jul 03 03:52:22 MST 2012

Quote: Zero
You are not really expecting an answer (from  here) if you are asking why your code is generating a HardFault without showing it :confused:



My program works fine. HardFault occurs only if can messages come before LPC1788 start to work. If it comes later all fine.

anyway here is my main(). Project is giant.
0 Kudos
Reply

602 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by researchinnovation on Tue Jul 03 02:59:04 MST 2012

Quote: yanvasilij
Others devises (LPC11C24) send CANopen frames (heartbits and PDO) all time when they turn on. LPC1788 take it and display on LCD. If  Others devises start send messages before LPC1788 turn on, HardFault_Handler occurs on LPC1788. Otherwise it works fine.



Hi...Yanvasilij!!!

What Error on the console ....??
Does HardFault_Handler error come when you run the code or when you debug it step by step?


http://support.code-red-tech.com/CodeRedWiki/DebugHardFault
http://infocenter.arm.com/help/topic...043C_rtabi.pdf
http://support.code-red-tech.com/CodeRedWiki/ArmCpuInfo
http://infocenter.arm.com/help/topic...043C_rtabi.pdf

Can you share your code in zip form??

Thanks & Regards.....:)
0 Kudos
Reply

602 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Jul 03 02:29:43 MST 2012
You are not really expecting an answer (from  here) if you are asking why your code is generating a HardFault without showing it :confused:
0 Kudos
Reply

602 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Tue Jul 03 01:03:36 MST 2012

Quote: researchinnovation
Hi..!!!

Please share the Error part and Explain little more about other hardware also.


Thanks & Regards....:)


Others devises (LPC11C24) send CANopen frames (heartbits and PDO) all time when they turn on. LPC1788 take it and display on LCD. If  Others devises start send messages before LPC1788 turn on, HardFault_Handler occurs on LPC1788. Otherwise it works fine.
0 Kudos
Reply

602 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by researchinnovation on Tue Jul 03 00:55:42 MST 2012

Quote: yanvasilij
Hello! I made an application for LPC1788 that works with others devises on CAN bus. It works fine when LPC1788 turn on first and there is no frames on CAN bus. But if some other devises start to send messages first LPC1788 stay on reset mode. Could somebody explain  to me how to fix this?
Regards Vasilij.




Hi..!!!

Please share the Error part and Explain little more about other hardware also.


Thanks & Regards....:)
0 Kudos
Reply