[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4792: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4793: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
AutoQuad Forum • View topic - Modifying ESC32 firmware

Modifying ESC32 firmware

Info and Discussion about the ESC32 hardware and software

Modifying ESC32 firmware

Postby w_covanich » Wed Sep 18, 2013 1:28 pm

I am currently working in the university and our professor would like to have an ESC which can do closed loop speed control. In addition the ESC is expected to be able to send information about current consumption and RPM of the motor to the flight controller in real time during flight. I search through internet and it seems ESC32 is a perfect solution. However, I think I may have to modify the firmware a bit in order to be able to achieve all the requirements. I am new to ARM but I have some experience programming PIC MCU. I have downloaded the source code of the firmware (1.4.3) and manage to compile it using Rowley cross studio (evaluation). However, I plan to use Coocox IDE which is a freeware. Fortunately, I manage to config and compile the firmware but the size of the hex file compiled by Coocox IDE is 273kb while the size of the firmware (hex) on the website is only 142kb. Therefore, I would like to ask for more information before I proceed to test the firmware compiled by Coocox as follows.

1. If I update ESC32 firmware using qGroundControl and there is a problem with the firmware, can I still use qGourndControl to upload an original ESC32 firmware on the website?

2. From question above, if I cannot upload ESC32 firmware using qGroundControl is there any way to upload the original firmware (I.E. using Coocox IDE to directly upload firmware to ESC32). If this is possible could you please outline the procedure and required equipments?

3. I think I2C interface for ESC32 is currenly being developed but I cannot find any code relate to I2C in ESC32 SVN. Am I miss look any thing? Could anyone point me to the ESC32 currenly being developed source which have some I2C related code?

We have just ordered ESC32 but the package is not arrived yet. Anyway, it will be great if I have some information about the ESC32 first.

Thank you for the help.
w_covanich
 
Posts: 5
Joined: Sat Jul 27, 2013 4:51 am

Re: Modifying ESC32 firmware

Postby bn999 » Wed Sep 18, 2013 4:32 pm

I think that ESC32 could be the quickest way to accomplish your goals with the minimum amount of work.

Although the hardware is I2C ready, there are no official I2C drivers available. What I would highly recommend is looking to go the CAN route for full duplex communications. CAN is much faster and more reliable than I2C and the trunk head (ver 2.0 alpha) has flight tested CAN drivers already implemented.

Freeware is nice, but if you want to minimize the work necessary to get an IDE up and running, I'd go with the native Crossworks. They have low cost Educational or Personal licenses available. There are people on this forum who would be able to answer questions concerning Crossworks as it applies to AQ hardware.

If you are going to be doing a lot of experimentation or development, you should really look into getting a SWD interface. ESC32 has a standard 10pin Cortex SWD footprint which you can populate. Flashing takes seconds and you will have access to real-time debugging of the running code. If using Crossworks, you can get one as cheap as the STM32F4 Discovery board for $20.

Take a look at the online documentation for ESC32 for UART flashing as it can be accomplished outside of QGC. There is no way that you can brick an STM32 MCU as the bootloader is in factory programmed ROM.
bn999
 
Posts: 1559
Joined: Thu Jun 21, 2012 11:40 pm

Re: Modifying ESC32 firmware

Postby w_covanich » Fri Sep 20, 2013 11:45 am

Thank you for your reply. It seems like CAN will be a good option. I will have to have a discussion with my professor. Anyway, it is nice to know that STM32 will not be bricked if UART is used for flashing. I will try to flash the firmware compiled by Coocox and see what happen before deciding which IDE should be used.
w_covanich
 
Posts: 5
Joined: Sat Jul 27, 2013 4:51 am

Re: Modifying ESC32 firmware

Postby dpetrillo » Wed Nov 06, 2013 11:37 pm

w_covanich: how did it work with Coocox? What did you use to connect to the SWD?

I bought an ESC32 to control brushless gimbal motors and may need the ability to modify the firmware also. Does anyone know anything about the servo mode or when it will be documented?

Thanks!
dpetrillo
 
Posts: 5
Joined: Wed Nov 06, 2013 10:58 pm

Re: Modifying ESC32 firmware

Postby djc » Wed Feb 05, 2014 10:41 pm

I am also trying to modify the ESC32 firmware. I have the project loaded in CrossStudio. However, when I compile the project I get the error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)." Can someone tell me what is the correct device to use? Looks like the options are:

/* #define STM32F10X_LD */ /*!< STM32F10X_LD: STM32 Low density devices */
/* #define STM32F10X_LD_VL */ /*!< STM32F10X_LD_VL: STM32 Low density Value Line devices */
/* #define STM32F10X_MD */ /*!< STM32F10X_MD: STM32 Medium density devices */
/* #define STM32F10X_MD_VL */ /*!< STM32F10X_MD_VL: STM32 Medium density Value Line devices */
/* #define STM32F10X_HD */ /*!< STM32F10X_HD: STM32 High density devices */
/* #define STM32F10X_HD_VL */ /*!< STM32F10X_HD_VL: STM32 High density value line devices */
/* #define STM32F10X_XL */ /*!< STM32F10X_XL: STM32 XL-density devices */
/* #define STM32F10X_CL */ /*!< STM32F10X_CL: STM32 Connectivity line devices */

Thanks!
djc
 
Posts: 6
Joined: Tue Dec 17, 2013 12:02 am

Re: Modifying ESC32 firmware

Postby sandmen » Wed Feb 05, 2014 10:44 pm

I think, that means you should install the library's from Crossworks.
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: Modifying ESC32 firmware

Postby djc » Wed Feb 05, 2014 10:53 pm

Ok. Which libraries from Crossworks need to be installed?

My understanding of the error is that I should uncomment one of the lines I copied depending on the device target.
djc
 
Posts: 6
Joined: Tue Dec 17, 2013 12:02 am

Re: Modifying ESC32 firmware

Postby kinderkram » Wed Feb 05, 2014 11:31 pm

Did you select the support package for STM32?
http://autoquad.org/wiki/wiki/development

Image
kinderkram
 
Posts: 2911
Joined: Fri Jun 22, 2012 7:47 am

Re: Modifying ESC32 firmware

Postby djc » Thu Feb 06, 2014 5:38 pm

Thanks. I missed that.

Is there a way to flash the ESC without being able to connect to it? I flashed with my new firmware, but after it rebooted I can no longer connect via serial. I only made some small changes to the motor commutation sequence in fet.c so I didn't think that would break serial communication.
djc
 
Posts: 6
Joined: Tue Dec 17, 2013 12:02 am

Re: Modifying ESC32 firmware

Postby Max » Thu Feb 06, 2014 9:12 pm

For debugging you may want to attach a SWD connector to the blank pads on the ESC32 and then use an STM32 debug adapter (the STLINK/v2 that comes on the STM32F4 discovery board is very affordable, $15 or something like that). You can also flash fw via SWD.

Having said that, you should be able to re-flash via serial (using eg. stm32loader) even with a "bad" firmware. In bootloader mode the regular firmware shouldn't be running at all. You will need to short the BOOT pads before powering it on.

HTH,
-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Next

Return to ESC32

Who is online

Users browsing this forum: No registered users and 9 guests

cron