ucandevices / CFDC_embedded

Embedded code and PCB for CAN FD to USB converter
GNU Lesser General Public License v3.0
12 stars 2 forks source link

Firmware upgrade procedure #9

Open KhazAkar opened 1 year ago

KhazAkar commented 1 year ago

Hello! Since we got gsusb firmware version for cfdc/cfuc devices, is there any firmware upgrade procedure available for user to do? It would be great to have it, for existing customers ;)

Cheers, Damian

Lukasz-Juranek commented 1 year ago

Hi, just go to DFU, you can do this from Java application and then upload new firmware.

niedz., 23 kwi 2023 o 09:41 Damian Zaręba @.***> napisał(a):

Hello! Since we got gsusb firmware version for cfdc/cfuc devices, is there any firmware upgrade procedure available for user to do? It would be great to have it, for existing customers ;)

Cheers, Damian

— Reply to this email directly, view it on GitHub https://github.com/ucandevices/CFDC_embedded/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7RRAQGWEGTVK5OANSA4PDXCTMMFANCNFSM6AAAAAAXILPTBI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

KhazAkar commented 1 year ago

Thanks! i just have one issue tho - where I can find java application? I've tried python tool from this repo, but it complains about bus.go_to_bootloader() ...

khazakar@dell-e7250:~/gitdownload/CFDC_embedded/tools/uCAN_CAN_Viewer/ucan_can_viewer/build$ python3 -m gui
connect click
can.conf
{'interface': 'cfuc', 'channel': '/dev/ttyACM0', 'CANBaudRate': '100000', 'IsFD': 'True', 'FDDataBaudRate': '1000000'}
can interface created
can rx thread started
rx exception
can rx thread exit
reflash
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib64/python3.9/tkinter/__init__.py", line 1892, in __call__
    return self.func(*args)
  File "/home/khazakar/gitdownload/CFDC_embedded/tools/uCAN_CAN_Viewer/ucan_can_viewer/build/gui.py", line 155, in on_reflash
    bus.go_to_bootloader()
AttributeError: 'cfucBus' object has no attribute 'go_to_bootloader'
Lukasz-Juranek commented 1 year ago

Hi To switch device to DFU just send over Serialport

https://github.com/ucandevices/CFDC_embedded/blob/830aa4006f803b5ef1e0f853225115626095f5bf/firmware/Inc/ucan_fd_protocol_stm32g431.h#L32

which should be 0x04

niedz., 7 maj 2023 o 22:55 Damian Zaręba @.***> napisał(a):

Thanks! i just have one issue tho - where I can find java application? I've tried python tool from this repo, but it complains about bus.go_to_bootloader() ...

— Reply to this email directly, view it on GitHub https://github.com/ucandevices/CFDC_embedded/issues/9#issuecomment-1537538275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7RRASKDXJBP4Z5IUWT2LDXFAD5LANCNFSM6AAAAAAXILPTBI . You are receiving this because you commented.Message ID: @.***>

KhazAkar commented 1 year ago

I'm trying, but my minicom on ttyACM0 still says 'Offline', as well as sending commands using echo or cat does not help. I'm setting 115200 baudrate using stty -F. Do I miss something?

KhazAkar commented 1 year ago

Exact commands I'm using: stty -F /dev/ttyACM0 115200 echo -e "\x04" > /dev/ttyACM0 minicom -b 115200 -D /dev/ttyACM0 (shows offline) No reaction on any of this.

KhazAkar commented 1 year ago

Tested on different machine, where I didn't had 'offline' - sending commands using gtkterm, minicom and screen don't work. Using pyserial module as well. No reaction from HW. Any idea? FW is at version before port to gsusb.

Lukasz-Juranek commented 1 year ago

this is no longer supported write me an email on @.*** with your address. I will resend you new devices, it would be great if you could send me back this broken one. I will look into why it is not working as expected.

pt., 2 cze 2023 o 22:54 Damian Zaręba @.***> napisał(a):

Tested on different machine, where I didn't had 'offline' - sending commands using gtkterm, minicom and screen don't work. Using pyserial module as well. No reaction from HW. Any idea? FW is at version before port to gsusb.

— Reply to this email directly, view it on GitHub https://github.com/ucandevices/CFDC_embedded/issues/9#issuecomment-1574303374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7RRAWKDTV7AKIJAD5G25LXJJHH7ANCNFSM6AAAAAAXILPTBI . You are receiving this because you commented.Message ID: @.***>