MCU User Forum
  How to handle the error status for Bosch-CAN on C8051F500

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   How to handle the error status for Bosch-CAN on C8051F500
dingyg99
Member
posted August 03, 2010 01:34 AM     Click Here to See the Profile for dingyg99   Click Here to Email dingyg99     Edit/Delete Message
Dear All:
We have implemented our CAN communication based on the example code in:
C:\SiLabs\MCU\Examples\C8051F50x_51x\CAN\F50x_CAN0_Receive.c

C:\SiLabs\MCU\Examples\C8051F50x_51x\CAN\F50x_CAN0_Transmit.c

We have merged the Tx and Rx interrupt ISR into one ISR to support Tx and Rx meantime.

In our project, there is one master node and eight client node. The master node periodically send command to each client node every 100ms, the client nodes with ID range from 0X01 to 0X09 will send reply to the master node according to the NodeID specified by the 1st byte of the message.

In this simple application model, we found a strange issue, below is a brief description:
(1) Keep the master node and 8 clients work normally

(2) Programming (by Keil IDE) the 1st client and then power off it, then re-power up it, the master node can NEVER communicate with this node.

(3) Keep the programmed client 1st re-power up, then re-power up the master node, the communication can NEVER recovery.

We have tried lots of times on this issue, NO one success to recovery communications between the master and client 1st.

So we want to know what happens on the client 1st, we program the client in debug mode in Keil IDE by the programming cable, but the communication can 100% recovery!

Then what is the differentce between offline mode programming and the online debug mode?


As well it is found that if we put the master node and the client 1st power down and then power up then the communication can be recovered 100%.

We can print out the CAN0 status register of the master node when the client 1st is off-line programmed and power up again(can not communication with master node). It is found the CAN0STAT is 0X63.

How should we handle the error status with CAN0STAT is 0X63? Accoring to the Boch CAN manual, the CAN core is in error passive state. How to get rid of this state?

Thanks & Best Regards!


IP: Logged

Tsuneo
Member
posted August 10, 2010 09:16 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
On the power cycle case,
Try manual reset at the reset pin of the receiver MCU, after power up and CAN bus connection. Does it recover the communication?
If so, attach an external supervisor chip at the reset pin.


I've played with SiLabs 'F500 dev board on power supply,
and found that leakage current disturbs power cycle of the MCU.

a) Driven by CAN transceiver
On this board, debug adapter power is available by setting up J7 jumper (SER_PWR). With this setting, +5V trace on the board is directly driven by a debug adapter. Even this supply is chosen, P4 power connector should be connected to a Wall-mount power supply. This power sources CAN and LIN transceivers over 5V voltage regulator, apart from the +5V trace.

- J7 is SER_PWR side, but no debug adapter is connected
- P4 connector is supplied.

In this set up, +5V trace on the board shows 2.82V
This voltage is built up by the leakage current through the 'F500 and 'F502 on the board. CAN transceivers (TAJ1050TD) drive the ports of 'F500 and 'F502 on the board, while the MCUs power down. Leakage current from these ports appears at VIO and VREGIN pins of the MCUs. When these pins are disconnected from +5V trace on J24 and J31, +5V trace drops to 0V.


b) Driven by CAN bus
- 5V is applied across CAN_H and CAN_L/GND ports at TB2 connector, using an external power supply.
- Any other power source is disconnected from the 'F500TB

+5V trace on the board shows 0.32V
This voltage is built up by the leakage current through the two CAN transceivers on the board. TAJ1050TD datasheet tells that the leakage through CAN bus pins is 250 uA (max)


It may be better to attach a supervisor chip to each reset pin of 'F500 and 'F502 for this board, too.


> How should we handle the error status with CAN0STAT is 0X63?

It is caused by absence of ACK from the receiver.
When the receiver recovers, CAN0STAT goes to normal gradually.

Tsuneo

[This message has been edited by Tsuneo (edited August 10, 2010).]

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b