FS6500 CAN communication in Debug Mode

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

FS6500 CAN communication in Debug Mode

1,495 Views
jyothsnarajan
Contributor V

I have an FS6500 connected to MPC5746 and want to test the CAN communication via the FS6500 CAN interface.

Section 11.6 /page 31 the FS6500 Datasheet Rev3.0 states that

"In debug mode, the CAN transceiver is set to normal operation mode by default allowing CAN communication without SPI configuration."  

Following the directions mentioned in AN5238 (reproduced here for convenience) I connected the 10K Dbg_Rpu resistor

pastedImage_1.png

After reading the above two, it seemed that I do not have to do any prior configuration of the FS6500.@ If I put the SBC in debug mode and configure the CAN interface on the MPC, and connect the TX/RX between the MPC and FS6500, I should be able to send/receive messages via the FS65xx CAN interface.

I created a simple program that

- initializes MPC CAN interfaces CAN_1 (connected to FS65xx) and CAN2(connected to external CAN transceiver) 

- sends a CAN message through each of the two interfaces.

Other than the I/O port/pad mux configuration, all configuration(CAN_CTRL1, RX/TX MB etc)are the same for both the interfaces.

CAN1 communication does not work - I do not see any output from the FS65xx CAN transceiver. I confirmed that MPC outputs TX data and on the FS65xx, data arrives at pins 20(TxD) but there is no output on pins 8/9 - the CANH/CANL  outputs. The problem appears to be localized to the FS65xx chip 

CAN-2 works as expected.

1. Has anyone tried exercising the CAN interface on the FS65xx when it is in debug mode, without doing any prior configuration via software? 

2. How do we know for sure that FS65xx is in debug mode?

3. If the FS65xx is wired as above, for debug mode and no other configuration has been done, what should be the values of these bits if I read the register over DSPI:

a) DBG_HW bit (bit 0 )of HW_CONFIG register

b) CAN_Mode_1, CAN_MODE_0 and CAN_AUTO_DIS (bits 7:5) of CAN_MODE register

4. If setup is required even if debug mode, what is the minimal configuration that must be done. 

I need to determine if the chip is bad or if it is only some missing configuration. If you have an example, that would be very helpful.

Thank you for suggestions.

0 Kudos
4 Replies

1,133 Views
jyothsnarajan
Contributor V

Hi NXP,

It is not possible to enable CAN on the FS65xx SBC WITHOUT initializing the FS65xx first.  Please  test  and  confirm and correct documentation if necessary.

SPI betweeen  MPC and FS65 must be setup and then the FS65_Init() / FS65_Config_NonInit()  function ( see the FS65xx driver example) has to be executed AT A MINIMUM before CAN is enabled.

I tested my board that contains MPC5745 and FS6513 using these same steps.  It is solely the users responsibility to consult the latest Reference documentation for the SBC and MPC they use.

Here is a cheat sheet for testing only the CAN Interface on SBC

1. Wire the SBC Debug pin for Debug mode operation. 

2. Wire the SBC Select pin to disable DeepFailSafe i.e connect to VPRE. ( See Note 1 below).

3. Power up the board and check voltages as mentioned in the document. Pay special attention to the voltage at the debug pin.

4. Create a test program for your MPC that includes

       a. Initializes  MPC to SBC CAN ports and configures  corresponding CAN Interface 

       b. Initializes  MPC to SBC DSP ports and configures corresponding interface

       c. FS65xx_GetStatus()   (See Note 2 below)

       d. FS65_Init(); FS65_Config_NonInit();  (See Note 3 below)

       e. FS65xx_GetStatus()  (See Note 2 below)

       f. CAN_Send()  and CAN_Receive() code.

5. Execute the  test program - SBC CAN should work. 

 

Note1: This connection disables DFS  and is suggested for DEBUG use only. This must be changed if you need DFS in your final product. 

Note2: Check the HW_Config() and DIAG_CAN_FD register values to find SBC state and CAN interface state.

Note3: Check and modify struct FS65_Registers_InitValues as necessary for your hardware setup/environment.

Hope it helps.

JR

0 Kudos

1,133 Views
mmurugesh
Contributor II

Did you find the solution for this issue?

Is the CAN is working if you put FS6500 in Debug by using the resistor configuration at power up?

Please share the details if you have found the solution..

0 Kudos

1,133 Views
jyothsnarajan
Contributor V

No, even with connections as indicated in document, am not able to use the SBC CAN. 

What should be the state of the FS0/1 pins when the SBC is in debug mode?

What should the value of the "DEBUG" bit in the HW_CONFIG reg when the chip is in Debug mode? Tried two different chips, so am sure its some configuration within the chip that is disabling CAN.

0 Kudos

1,133 Views
mmurugesh
Contributor II

I think both FS0/1 will be low during power on sequence in debug.

Debug bit will be set.

0 Kudos