pcan_pro_x icon indicating copy to clipboard operation
pcan_pro_x copied to clipboard

Reference hardware

Open moonglow opened this issue 3 years ago • 39 comments

MCU board

  • DevEBox STM32F407VGT6 or STM32F407VET6

CAN transceiver

  • TJA1050 module

LIN transceiver

  • TJA1021

You can buy it on TaoBao or AliExpress

moonglow avatar Jan 15 '21 10:01 moonglow

FAQ:

Q. Do i need to make changes to firmware for STM32F405 ? A. Nope. You no need to change anything.

Q. Can you provide photo of your MCU test board ? A. Yes. As example you can use such boards. STM32F407VET6

moonglow avatar Jan 27 '21 18:01 moonglow

Nice project. What lin driver did you install?

Memfispro avatar Jul 17 '21 02:07 Memfispro

@Memfispro Thank you! You can use TJA1021 as LIN bus driver.

moonglow avatar Jul 17 '21 19:07 moonglow

@Memfispro Thank you! You can use TJA1021 as LIN bus driver.

Thank you.

Memfispro avatar Jul 20 '21 10:07 Memfispro

has there been a daughter board designed to drop in place to attach to the MCUDEV DEVEbox board?

mitchdetailed avatar Oct 27 '21 14:10 mitchdetailed

@mitchdetailed Hi ! I just attach all modules by wires... Special boards is not very suitable for DIY...

moonglow avatar Oct 27 '21 16:10 moonglow

Q1; is it theoretically possible to change pinout to match F407 discovery or would it hit any pin/DMA/etc conflicts?

Q2: any chance to have pinout flexible at build time with defines etc?

rusefillc avatar Nov 10 '21 14:11 rusefillc

A1: yep you can try absolutely any board you want with F407/F405 IC just connect pins as it described at main page table. A2: nice tips, i will think about it.

moonglow avatar Nov 10 '21 14:11 moonglow

Added support for HEX-V2 clone ( it will works as single channel CAN adapter, HW is STM32F415VG based ): LINK

moonglow avatar Dec 27 '21 12:12 moonglow

Hi! I have a STM32F405 board and want to flash this code. I dont understand if need bootloadr or not. I have to program the microcontroller with stlink and that's it? should I use the bin or the hex? I installed stm32cubeprogrammer, do you recommend something else?

thank you very much

MC-tecnologias avatar Nov 21 '22 17:11 MC-tecnologias

@MC-tecnologias how much experience do you have with stm32 platform?

Please note that stm32 has build-in bootloader allowing you to program a chip using UART or CAN or USB.

rusefillc avatar Nov 21 '22 17:11 rusefillc

hi @rusefillc ! thank you for replying. I have experience in microcontrollers but mainly microchip family. If I plug my board to the PC in DFU mode it recognizes it as "STM32 BOOTLOADER", so I could load the code that way? should I choose the bin or the hex?

MC-tecnologias avatar Nov 21 '22 17:11 MC-tecnologias

@MC-tecnologias i think you can load either of binary files

rusefillc avatar Nov 21 '22 17:11 rusefillc

I have my board programmed! And windows recognize as "XCAN-USB-PRO CAN Device", but I dont have the driver installed. Where can I download the driver?

MC-tecnologias avatar Nov 21 '22 19:11 MC-tecnologias

I understand that it no longer appears with the peak vendor-id, but will the software that is waiting for a PCAN-USB recognize it?

MC-tecnologias avatar Nov 21 '22 19:11 MC-tecnologias

@MC-tecnologias

I understand that it no longer appears with the peak vendor-id, but will the software that is waiting for a PCAN-USB recognize it?

You need to change two number to they original value to make it recognized by your system drivers... You can't load original PCAN drivers without such changes.

moonglow avatar Nov 21 '22 19:11 moonglow

Hi, I have my board programmed and recognized by pcan-view and busmaster. has an 8MHz crystal. Looking with an oscilloscope nothing comes out of the PB8/PB9 or PB5/PB6 ports when I send a message with any of the software. Am I missing something?

thanks!

MC-tecnologias avatar Nov 22 '22 23:11 MC-tecnologias

@MC-tecnologias Did you attach CAN bus transceivers ( as example TJA1050 ) to that pins ? Provide as more information, what did you change how you connect external phy to board and so on ...

moonglow avatar Nov 23 '22 05:11 moonglow

Yes, I have a mcp2551. Anyway, I understand that it is a transciever, so with or without it should come out pulses, correct?

MC-tecnologias avatar Nov 23 '22 10:11 MC-tecnologias

If you built correct firmware and connect all as it should be it must works as expected.

p.s: MCP2551/TJA1050 use 5V as VDD

moonglow avatar Nov 23 '22 11:11 moonglow

Yes, I have MCP powered with 5V and STM32 with 3V3. The board is a drone flight controller with a stm32f405.

MC-tecnologias avatar Nov 23 '22 11:11 MC-tecnologias

On code I only change: pcan_usb_vendor_id on pcanpro-usbd.h And usbd_manufacturer_string usbd_product_string_hs usbd_interface_can_string_hs On usb_desc.h

MC-tecnologias avatar Nov 23 '22 12:11 MC-tecnologias

The board is a drone flight controller with a stm32f405.

Please check your pin schematic, maybe you have pin conflict... maybe you try use PA11/PA12 pins for USB and for not suitable FW for that... i can't imagine all possibles situations.

p.s: https://github.com/moonglow/pcan_pro_x/issues/1#issuecomment-1324907020

moonglow avatar Nov 23 '22 14:11 moonglow

Hi! I solder STM32 to a breadboard and connect only it's neccesary pins. And same result, windows recognize it (I understand that uC <=> PC connection is working) but never send messages and dont turn on TX led.

MC-tecnologias avatar Nov 24 '22 22:11 MC-tecnologias

@MC-tecnologias

  1. You try to solve some abstract problem for my pov, because you do not tell which fw variant you build ( i recommends you 1 channel fd version, or pro fd version ). Please try to understand what we cant saw what you actually have and do
  2. Try to debug firmware and set breakpoint on command handler, i do not believe in miracles
  3. Send me your source archive with your prebuilt firmware.... and i will try it on my reference dev board

moonglow avatar Nov 25 '22 04:11 moonglow

hi @moonglow, thank you very much for your time and help. I am using the XCAN PRO version. What I need is a can-bus interface recognized as PCAN-USB to communicate, through a special software, with a computer via CANOpen protocol. I tried with the code modified by me but I also tried the V0.4 release without making any changes. I always get the same result.

MC-tecnologias avatar Nov 25 '22 17:11 MC-tecnologias

FAQ:

Q. Do i need to make changes to firmware for STM32F405 ? A. Nope. You no need to change anything.

Q. Can you provide photo of your MCU test board ? A. Yes. As example you can use such boards. STM32F407VET6

I found a with the same board and usb connection PA11/12. And I read the F407 manual. If you need a high speed PHY for USB-HS, should you use USB-FS or USB-HS for PB14/15?

kristyandi avatar Dec 14 '22 10:12 kristyandi

@kristyandi Hi!

You no need high speed PHY for USB-HS in my case... Readme file refer you which one need to use, without hi-speed PHY USB-HS will works in USB-FS mode BUT it has much more endpoints for device such PCAN PRO so it is a little trick to get more endpoints for USB. One channel builds does no need to solder additional pins.

p.s: you can connect PA11 to PB14 and PA12 to PB15 to run any of that firmwares and have ability to run internal STM USB bootloader as example...

moonglow avatar Dec 14 '22 10:12 moonglow

Added support for HEX-V2 clone ( it will works as single channel CAN adapter, HW is STM32F415VG based ): LINK

flashed this board with st-link and no sign of life...

P208PUG avatar Dec 22 '22 09:12 P208PUG

@P208PUG maybe you can provide more information ? which version you flashed in ? how it recognized by your system... did you read about that issue #16 ? You can also read about that hw HERE.

moonglow avatar Dec 22 '22 10:12 moonglow