daeroro Posted April 24, 2019 Share Posted April 24, 2019 Hi I'm using pmod CAN module to communicate between zybo z7-10 and tms570LC4357 launch pad(Texas Instrument). The connection is like this : zybo z7-10( - Pmod CAN module) ----------------- CAN trasceiver(SN65HVD230) -- tms570LC4357 launch pad I took a test with zybo z7-10 - tms570LC4357 launch pad(bit rate = 250kbps), the oscilloscope graph is the graph with delta x = 82us, 1/delta x = 12.2KHz. And CAN doesn't work.. (the probe is picking CANH(red), CANL(yellow) in Pmod CAN module) I'd like to change bit rate, so I took a look the datasheet ( mcp25625). And change registers CNF1, CNF2, CNF3 CNF1 (0x41) -> (0x09) CNF2 (0xFB) -> (0xFF) CNF3 (0x86) -> (0x87) 250kbps -> 40kbps but...! the graph's period doesn't change at all.. Is there anything I shall do more things to change bit rate? Sorry for bad english.. please answer.. thx!! Link to comment Share on other sites More sharing options...
jpeyron Posted May 2, 2019 Share Posted May 2, 2019 Hi @daeroro, Sorry for the late response, we were out of the office some of last week and this week. Please attach a screen shot of your vivado block design along with your sdk code. What mode are you using I.E. loop back or normal? best regards, Jon Link to comment Share on other sites More sharing options...
daeroro Posted May 4, 2019 Author Share Posted May 4, 2019 Thanks for reply!! I made vivado block design referencing this tutorial -> https://reference.digilentinc.com/learn/programmable-logic/tutorials/pmod-ips/start And the sdk code reference is this -> https://github.com/Digilent/vivado-library/blob/master/ip/Pmods/PmodCAN_v1_0/drivers/PmodCAN_v1_0/examples/TX.c The mode TX.c example uses is normal! Is this right that Pmod CAN has internal 20MHz clock source? In the schematic below, CSTCE20MV13L99-R0 datasheet says it's 20MHz Sorry for BAD english again..! Thanks for reading!! Link to comment Share on other sites More sharing options...
jpeyron Posted May 6, 2019 Share Posted May 6, 2019 Hi @daeroro, The Pmod CAN IP core does not use the interrupts. How many Pmod CAN's do you have. If you have two Pmod CAN's are you able to run the loop back demo? The data sheet here will help you configure the Pmod CAN. best regards, Jon Link to comment Share on other sites More sharing options...
daeroro Posted May 7, 2019 Author Share Posted May 7, 2019 16 hours ago, jpeyron said: Hi @daeroro, The Pmod CAN IP core does not use the interrupts. How many Pmod CAN's do you have. If you have two Pmod CAN's are you able to run the loop back demo? The data sheet here will help you configure the Pmod CAN. best regards, Jon Thanks for answering @jpeyron Well,,, you missed the hyperlink of data sheet.. I already run the loop back demo and it did work properly. What I really want to do is transmitting data from fpga(zybo-z7) to mcu(TMS570LC4357 launch pad). So bit timing configuration is important, I think. Is that right that if I change the bit rate, the oscilloscope waveform changes? (What I meant is deltaT in waveform below) The deltaT(in below graph) doesn't change at all best regards, daero Link to comment Share on other sites More sharing options...
Thies Posted May 28, 2019 Share Posted May 28, 2019 I had the same problem with PMOD CAN and Arty S7 Board using Xilinx Vivado and SDK. Baud rate did not change at all. The problem is the last byte in the CAN_ModifyReg command in PmodCAN.c file, which is "CAN_ModeConfiguration". The enumeration CAN_Mode in PmodCAN.h is wrong/cannot be used in this way. CAN_ModeConfiguration has value 4 (0x04) but 0x80 is needed for the command. See chapter 5.9 "Bit Modify Instruction " and "CAN Control Register" in the MCP25625 datasheet. With this change, baud rate changes and CAN communication works. Link to comment Share on other sites More sharing options...
jpeyron Posted May 28, 2019 Share Posted May 28, 2019 Hi @Thies, Welcome to the digilent forums! Thank you for sharing a resolution to an issue with the Pmod CAN driver. We will pass this information on to our content team. best regards, Jon Link to comment Share on other sites More sharing options...
jpeyron Posted May 30, 2019 Share Posted May 30, 2019 Hi @Thies and @daeroro, I have updated the following code to reflect the correct CAN_ModeConfiguration register: typedef enum CAN_Mode { CAN_ModeNormalOperation = 0, CAN_ModeSleep, CAN_ModeLoopback, CAN_ModeListenOnly, CAN_ModeConfiguration = 0x80 } CAN_Mode; best regards, Jon Link to comment Share on other sites More sharing options...
Question
daeroro
Hi
I'm using pmod CAN module to communicate between zybo z7-10 and tms570LC4357 launch pad(Texas Instrument).
The connection is like this :
zybo z7-10( - Pmod CAN module) ----------------- CAN trasceiver(SN65HVD230) -- tms570LC4357 launch pad
I took a test with zybo z7-10 - tms570LC4357 launch pad(bit rate = 250kbps),
the oscilloscope graph is the graph with delta x = 82us, 1/delta x = 12.2KHz.
And CAN doesn't work..
(the probe is picking CANH(red), CANL(yellow) in Pmod CAN module)
I'd like to change bit rate, so I took a look the datasheet ( mcp25625).
And change registers CNF1, CNF2, CNF3
CNF1 (0x41) -> (0x09)
CNF2 (0xFB) -> (0xFF)
CNF3 (0x86) -> (0x87)
250kbps -> 40kbps
but...!
the graph's period doesn't change at all..
Is there anything I shall do more things to change bit rate?
Sorry for bad english..
please answer..
thx!!
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.