Jump to content
  • 0

pmod can period


daeroro

Question

Hello, I'm working on zybo z7 & pmod can

I want to transmit data from zybo z7 to other board(not zybo, tms570lc43x launchpad).

 

So I took a test :

(computer) - (usb2can) --------------------------- (can transceiver) - (tms570 board).

 

It really worked well.

 

426982104_2019-05-2220-53-40.thumb.jpg.74cdbe1ea895847459cd4f25ecf8158c.jpg

 

But I took a test like this:

(zybo-z7) - (pmod can) -------------------------------------- (can transceiver) - (tms570 board)

 

It doesn't work!!!!!

1577124217_2019-05-2220-54-33.thumb.jpg.b7e1ccea8ec2d93dc63bdc7459240e4f.jpg

 

and the signal period is about 8 times slower than above picture..

How can I make it work?

I need your advice

 

thanks!!

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

10 hours ago, vicentiu said:

Are you using Linux or bare metal on the Zybo Z7?

Hi, vicentiu.

I'm using vivado + sdk

-hardware design : https://reference.digilentinc.com/learn/programmable-logic/tutorials/pmod-ips/start

-sdk example : https://github.com/Digilent/vivado-library/blob/master/ip/Pmods/PmodCAN_v1_0/drivers/PmodCAN_v1_0/examples/TX.c
 

 + I ran the Lookback.c  example and it worked!!

Link to comment
Share on other sites

Hi @daeroro,

It looks like you have been able to alter the bit rate which was discussed in your other post here

I would suggest exposing the signals between the Pmod Can and the Zybo and using an oscilloscope on these signals.

Do you have a CAN bus analyzer so you can better see what is being communicated between the Pmod CAN and the tms570 board?

best regards,

Jon

Link to comment
Share on other sites

19 hours ago, jpeyron said:

Hi @daeroro,

It looks like you have been able to alter the bit rate which was discussed in your other post here

I would suggest exposing the signals between the Pmod Can and the Zybo and using an oscilloscope on these signals.

Do you have a CAN bus analyzer so you can better see what is being communicated between the Pmod CAN and the tms570 board?

best regards,

Jon

Hi, @jpeyron

Thanks for reply.

 

Unfortunately, I can't alter the bit rate.

The graph was changed even if I used same hardware design and SDK example. I don't know why.

 

Have you ever tried to change bit rate and it worked??

thanks!!

Link to comment
Share on other sites

Well, I figure out a bug in the example code.

In the CAN_Configure function :


   // Set CAN control mode to configuration
   CAN_ModifyReg(InstancePtr, CAN_CANCTRL_REG_ADDR, CAN_CAN_CANCTRL_MODE_MASK,
         CAN_ModeConfiguration );

 

needs to be changed like this:

 

   CAN_ModifyReg(InstancePtr, CAN_CANCTRL_REG_ADDR, CAN_CAN_CANCTRL_MODE_MASK,
         CAN_ModeConfiguration << CAN_CANCTRL_MODE_BIT);

 

So it can enter the configuration mode...

After changing the code, CAN communication between Zybo-z7 and MCU works really well.

 

You need to change your git example code.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...