• 0
ukkun

PmodCAN :bitstream is not compatible with the target

Question

Hello

I'm using PYNQ-Z1 board.

I am trying to receive CAN traffic with PmodCAN on the board.

Here is my Block Design.

RXtest.thumb.png.3795dc342a391db051bec5d9f42a4ed0.png

 

Then, Generate Bitstream was successful.

(But some warnings appeared and the messages are like Generate_Bitstream_messagex.png)

 

I did Export Hardwear and Launch SDK.

When I created the Hello world project in SDK and compiled it, there was no problem.

However, as soon as I executed Program FPGA, the following error message appeared. How can I fix this error?

----------------------------------------------------------------------------------------------------------------------------

bitstream is not compatible with the target
Program FPGA failed
  bitstream is not compatible with the target
----------------------------------------------------------------------------------------------------------------------------

By the way, the PmodCAN wiki page says that it is necessary to send SPI commands to set up PmodCAN. Do I have to do this setup when sending and receiving CAN messages on the PYNQ board?

https://reference.digilentinc.com/reference/pmod/pmodcan/reference-manual

Generate_Bitstream_message1.png

Generate_Bitstream_message2.png

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Welcome to the Forums!

The "bitstream is not compatible with the target" error means that the part selected when you created the project does not match the part that the hardware manager found on the Pynq. You can change the part or board through the first page of the project's Settings dialog. Make sure that the part matches "xc7z020clg400-1".

All communication with the Pmod CAN from the host board goes through a SPI bus. The Pmod IP core and its drivers wrap a Xilinx Quad SPI IP core and xspi drivers, so the actual SPI protocol is mostly abstracted away when you are writing your code.

Thanks,

Arthur

Edited by artvvb

Share this post


Link to post
Share on other sites
  • 0

Hi, @artvvb

 

Thank you for replying to my post!!

The above problem has been resolved, but I have failed to receive CAN messages...

I set up a CAN bus, sent traffic logs from the CAN analyzer to PmodCAN, and ran "C: \ Xilinx \ ip \ Pmods \ PmodCAN_v1_0 \ drivers \ PmodCAN_v1_0 \ examples \ RX.c" with Launch on Hardwear However, the following screen is displayed.
The sample code Rx.c has not changed anything from the code distributed with git.DONTreceive.thumb.png.62a1af687cbd065958da2d710827ba78.png

By the way, the screen which ifconfig command is executed on the PYNQ-Z1 board is as follows.ifconfig.thumb.png.93a3d6b0f1162823001c922ea686a2b4.png

I know that the return value in the CAN_ReadStatus () in Rx.c is not good, and it occurs this result.                                                                                                                                    However, I don't know why the return value of the function is not good.

Could you give me advice?

Share this post


Link to post
Share on other sites
  • 0

The messages may need to be sent after RX.c has already been launched.

CAN_ReadStatus directly returns the result of the READ STATUS command specified in the MCP25625 Datasheet. It could also be worthwhile to print the result of a CAN_RxStatus call, as it has more information about the status of the chip's read buffers.

Thanks,

Arthur

Share this post


Link to post
Share on other sites
  • 0

Thank you very much for the advice!!!

After launching Rx.c, sending a message from the CAN analyzer, the situation remained the same.

As you said, when I output the return value of CAN_ReadStatus (), 0 was always output. This means that there is no data in the MCP25625 receive buffer.

I'll try debugging now, but if you have any comments, please give me some advice.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now