cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
epech
Visitor
Visitor
3,656 Views
Registered: ‎07-21-2016

XCanPs Self Test Fails

Jump to solution

The Hardware

  • I'm using a Microzed + Embedded Vision Carrier Card
  • I enabled the CAN0 interface and mapped it to MIO 10-11 (see image below)

PS Config.png

The Software

 

I regenerated the BSP and I'm now able to see the XCanPs driver in the BSP.

I initialize the controller:

 

	pCanPs_config = XCanPs_LookupConfig(XPAR_PS7_CAN_0_DEVICE_ID);
	XCanPs_CfgInitialize(pdemo->pCan, pCanPs_config, 0xAA);

Then I call the self-test function

 

 

XCanPs_SelfTest(pdemo->pCan);

 

The Problem

 

Self test fails because the mode is not Config (see image below where it fails), the mode is XCANPS_MODE_SLEEP:

XCanPs_SelfTest.png

 

 

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
epech
Visitor
Visitor
6,887 Views
Registered: ‎07-21-2016

It's working now. There were 2 problems:

 

  • The following line of code was incorrect, the second parameter shouldn't be 0xAA
  • 	XCanPs_CfgInitialize(pdemo->pCan, pCanPs_config, 0xAA);
  • For whatever reason SDK was downloading an incorrect Bitstream.

 

View solution in original post

0 Kudos
1 Reply
epech
Visitor
Visitor
6,888 Views
Registered: ‎07-21-2016

It's working now. There were 2 problems:

 

  • The following line of code was incorrect, the second parameter shouldn't be 0xAA
  • 	XCanPs_CfgInitialize(pdemo->pCan, pCanPs_config, 0xAA);
  • For whatever reason SDK was downloading an incorrect Bitstream.

 

View solution in original post

0 Kudos