UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor epech
Visitor
3,519 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
Visitor epech
Visitor
6,750 Views
Registered: ‎07-21-2016

Re: XCanPs Self Test Fails

Jump to solution

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
Visitor epech
Visitor
6,751 Views
Registered: ‎07-21-2016

Re: XCanPs Self Test Fails

Jump to solution

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