• AVR Freaks

Hot!CAN Bootloader

Page: < 12 Showing page 2 of 2
Author
ASICAlex
Starting Member
  • Total Posts : 43
  • Reward points : 0
  • Joined: 2018/02/27 15:40:02
  • Location: 0
  • Status: offline
Re: CAN Bootloader 2019/03/31 14:50:43 (permalink)
0
Hi Stefan,
Thanks for always replying to me.  So far I am a fan of the EZBL as it was super easy to integrate for the UART interface.   I will study the code and see if I can incorporate CAN.  I have all the code obviously from the CAN interface on my ECU board, so just need to copy that to this bootloader project.  I guess first thing to do is see how it handles changing between UART/I2C/USB built in, and as you said , see how to incorporate the EZBL API.  Ill let you know how it goes!
 
Alex
#21
ASICAlex
Starting Member
  • Total Posts : 43
  • Reward points : 0
  • Joined: 2018/02/27 15:40:02
  • Location: 0
  • Status: offline
Re: CAN Bootloader 2019/04/01 20:36:51 (permalink)
0
Thanks Stefan,
I have been looking at this last couple days.  Working my way through it.  I am using the actual ezbl_lib code instead of the .a file and am just trying to step through it to see how it works.  But yeah, I get the idea from a high level.  I need to make the EZBL FIFO interface point to data from the CAN.  Basically be able to tell it when there is data available on CAN, give it pointers to the FIFO, implement my ISR's for the CAN and DMA, and try to stitch this into my newly created ex_boot_can project.  I have done all the initialization for the CAN and DMA in my hardware initializer and am leaving the ezbl_lib alone. But you are the man if you got this to work pretty quickly!!! There is a lot of complicated code. 
#22
ASICAlex
Starting Member
  • Total Posts : 43
  • Reward points : 0
  • Joined: 2018/02/27 15:40:02
  • Location: 0
  • Status: offline
Re: CAN Bootloader 2019/04/11 22:52:05 (permalink)
0
It seems that there is bi-di communication when uploading a new firmware image?  Im sure the EZBL comm tool takes care of this, but I assume you had to take this into account when you wrote your own program?  I thought it would be unidirectional only: all that had to be done was send the bl2 file.  But I am seeing a few FIFO write commands in the install 2 flash function.  Also, was your CAN to USB adapter able to send data out a virtual COM port, or was it just a "normal" USB device?  I was thinking if I got a CAN to USB adapter that enumerated as a virtual COM port, I could use the EZBL tool to send the firmware image, but right now I have the PEAK PCAN USB adapter.  They do provide APIs for it, but this may be too complicated to get done in the short amount of time I have left.  I might have to see if I can get that github version working.
#23
ASICAlex
Starting Member
  • Total Posts : 43
  • Reward points : 0
  • Joined: 2018/02/27 15:40:02
  • Location: 0
  • Status: offline
Re: CAN Bootloader 2019/04/20 14:04:37 (permalink)
0
Well, I ended up ditching the EZBL and going with the other CAN bootloader. I actually had most of the EZBL converted to use CAN, but my issue was trying to test it.  I saw a lot of work there, so decided to change approaches.  The one I decided to use is working well and it uses python scripts to send the image down over my PCAN USB adapter.  Perhaps if I have time and if it is necessary I will create a little GUI with the python code.  I like that this bootloader only runs at startup or when there is no "application" in it.  I guess with the EZBL that wasn't a big deal as you could just forward all the interrupts to the application code. 
#24
Stampede
Super Member
  • Total Posts : 400
  • Reward points : 0
  • Joined: 2006/10/04 05:59:28
  • Location: Germany
  • Status: offline
Re: CAN Bootloader 2019/05/05 07:50:15 (permalink)
0
ASICAlex
It seems that there is bi-di communication when uploading a new firmware image?  Im sure the EZBL comm tool takes care of this, but I assume you had to take this into account when you wrote your own program?  I thought it would be unidirectional only: all that had to be done was send the bl2 file.  But I am seeing a few FIFO write commands in the install 2 flash function.  Also, was your CAN to USB adapter able to send data out a virtual COM port, or was it just a "normal" USB device?  I was thinking if I got a CAN to USB adapter that enumerated as a virtual COM port, I could use the EZBL tool to send the firmware image, but right now I have the PEAK PCAN USB adapter.  They do provide APIs for it, but this may be too complicated to get done in the short amount of time I have left.  I might have to see if I can get that github version working.


Yes, the EZBL replies to the host software (free bytes in the FIFO and some flow control information).
I think ditching the EZBL wasnt a reasonable chioce, it's one of the most versatile little bootloaders I've seen.
#25
ASICAlex
Starting Member
  • Total Posts : 43
  • Reward points : 0
  • Joined: 2018/02/27 15:40:02
  • Location: 0
  • Status: offline
Re: CAN Bootloader 2019/05/05 13:39:52 (permalink)
0
Yeah, I had to make a call to try to get something working quickly.  Perhaps the EZBL might be better, but the CAN bootloader I used (and the GUIs I created to use it) are working okay.  I only had a set amount of time to get something working. 
#26
DhavalPatel
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2019/06/21 08:37:09
  • Location: 0
  • Status: offline
Re: CAN Bootloader 2019/07/01 09:55:26 (permalink)
0
Hello Alex,
I am working on the project which has same requirement. Its bootloader project for dsPIC33EP512MC504 controller and want to transfer application over CAN bus. I will be grateful if you provide CAN bootloader project link (git), which works for you.
 
I also wanna know about what needed to integrate CAN bus in EZBL project. 
 
Thanks 
Dhaval
post edited by DhavalPatel - 2019/07/01 10:02:44
#27
Page: < 12 Showing page 2 of 2
Jump to:
© 2019 APG vNext Commercial Version 4.5