Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 23, 2021, 03:11:02 15:11


Login with username, password and session length


Pages: [1]
Print
Author Topic: PEAK PCAN CAN USB adapter - DIY  (Read 5251 times)
0 Members and 1 Guest are viewing this topic.
Fallout
Junior Member
**
Offline Offline

Posts: 76

Thank You
-Given: 7
-Receive: 274


« on: January 25, 2021, 09:53:26 09:53 »

for STM32F042 based hardware ( CANtact, CANable, Entreé ) - 1 channel ( acts as PCAN USB ):
https://github.com/moonglow/pcan_cantact

for STM32F407/405 dev boards - 1/2 channel ( acts as PCAN PRO/PCAN PRO FD/PCAN FD ):
https://github.com/moonglow/pcan_pro_x

Device will acts as original PCAN adapter ( PCAN/ PCAN FD/ PCAN PRO /PCAN PRO FD ) and give you full access to CAN bus through original PCAN API libs or other popular tools like BusMaster/PCAN-View. Will also works in Linux through socketcan subsystem or pcanview for Linux.

Notes:
ST bxCAN actually does not support FDCAN frames ( only classic CAN ), but i recommends you to use PRO FD firmware for 2 channel version to achive more performance in windows OS due some internal limitation of windows driver for PCAN PRO version.

Logged
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1166

Thank You
-Given: 459
-Receive: 403



« Reply #1 on: July 18, 2021, 09:01:54 09:01 »

I've been thinking and looking at this for a project I've got in mind and would like to start playing but I've only done picbasic and arduino along with the EPS32 but used the Arduino IDE to program these.
What software would I need to compile and up load this to an DevEBox STM32F407VGT6 ?

I need a bit of guidance fro me to get to program this and start playing with them

Thanks
Wizpic

Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
h0nk
Active Member
***
Offline Offline

Posts: 204

Thank You
-Given: 182
-Receive: 164



« Reply #2 on: July 18, 2021, 10:28:47 10:28 »


Hello Wizpic,

I've been thinking and looking at this for a project I've got in mind and would like to start playing but I've only done picbasic and arduino along with the EPS32 but used the Arduino IDE to program these.
What software would I need to compile and up load this to an DevEBox STM32F407VGT6 ?

I need a bit of guidance fro me to get to program this and start playing with them

Thanks
Wizpic

The project page says:
> Toolchain:
>
>    GNU Arm Embedded Toolchain

Depending on Your environment, You should add the GNU Arm Binutils and
GNU Make in recent versions. To build on Windows You may need a recent
MSYS Environment also.

For the upload there are several options:
- Use the Bootloader of the STM32F407. For this You will need the "DFU-Utility" from ST.
- Use a JTAG/SWD-Adapter. Recommended is a Segger J-Link, but a cheap Chinese
Clone of the ST-Link will also do. Most evalbaords have an integrated ST-Link.
You can use this also for Your own designs.

If You want to play with the Controller and get an easy entry, i would recommend
an integrated IDE for the first steps, as they will work usually "out of the box".
IAR's Embedded Workbench would be a good choice.

Good luck, and

Best Regards
Logged
digitalmg
Junior Member
**
Offline Offline

Posts: 84

Thank You
-Given: 118
-Receive: 82


« Reply #3 on: July 18, 2021, 02:37:42 14:37 »

I made both versions  CANtact as PCAN USB and PCAN PRO FD with STM32G407 , if you want I can send you the hex files.
For load the hex I use STM32Cube Programmer or  Segger J-Flash.

Best Regards
Logged
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1166

Thank You
-Given: 459
-Receive: 403



« Reply #4 on: July 18, 2021, 05:23:23 17:23 »

I was looking at getting one of these.

Would the code compile and upload via an IDE ?
Of am I thinking its to much like arduino  Grin

I know or think  that I've got to get an TJA1050 module for the front end to hook up to canbus

Thanks for the offer of the hex file I would have to have a look for a programmer if I went down that route
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
digitalmg
Junior Member
**
Offline Offline

Posts: 84

Thank You
-Given: 118
-Receive: 82


« Reply #5 on: July 19, 2021, 05:22:58 17:22 »

I did not compile with IDE, I installed arm gcc compiler(gcc-arm-none-eabi-10-2020-q4-major-win32.exe) and MinGW to be able to execute the make command.
I had problems recognizing the usb driver, when you do the usb part, you don't have to mount the 1.5km resistor between D + and 3.3v.

Best Regards
Logged
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1166

Thank You
-Given: 459
-Receive: 403



« Reply #6 on: August 07, 2021, 07:10:46 19:10 »

I've finally got my board as the pic above, I went to downlaod STM32 ST-LINK utility but registration/ download is under maintenance, Typical ;-)
I've been trying to work out how to compile the dam thing
I know you have mentioned   GNU Arm Embedded Toolchain thing but I aint  got a clue how to sue it I just get a Gcc command prompt dos box ??

I think once complied you can use  the STM32 ST-LINK utility to upload the hex file from the videos I've watched
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
digitalmg
Junior Member
**
Offline Offline

Posts: 84

Thank You
-Given: 118
-Receive: 82


« Reply #7 on: August 08, 2021, 05:12:14 17:12 »

You need to install MinGW, it allows programmers to use GCC compiler on a Microsoft Windows system.
To make it easier for you, I am attaching the hex file from pcan fd pro.

Best Regards.

 
Logged
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1166

Thank You
-Given: 459
-Receive: 403



« Reply #8 on: August 08, 2021, 06:33:11 18:33 »

That's a great and thanks,
So I just connect the BTO pin to 3.3V and using STM32 cube and download the hex file, Which I've done and it say it's there and when I read it back it reads the hex file you uploaded.
I remove BTO from 3V reboot and start PCAN view but it can't find the device, I must be doing something wrong my end ?

I'm grateful for your help and taking the time to compile the file, I'm new to the STM32 world so please bare with me

Wizpic
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1166

Thank You
-Given: 459
-Receive: 403



« Reply #9 on: August 08, 2021, 07:42:20 19:42 »

forget that I've got it working, I was not using the **PB14/PB15**  pins silly me Grin

Off to do do some playing
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
Fallout
Junior Member
**
Offline Offline

Posts: 76

Thank You
-Given: 7
-Receive: 274


« Reply #10 on: August 10, 2021, 12:20:36 12:20 »

Btw you can always get precompiled hex files on Release page Wink
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC