View previous topic :: View next topic |
Author |
Message |
Robotan
Joined: 12 Jul 2008 Posts: 18 Location: Canada
|
Wireless bootloader |
Posted: Tue Dec 15, 2009 11:32 am |
|
|
I am currently working on a project that could benefit from a bootloader. I want to make it more convenient by allowing the updates to be done over a bluetooth connection. I have a bluetooth module connected and working at a baud of 115200. Unfortunately the hardware serial port is dedicated to other hardware, so the bluetooth module is connected to pins that use software serial routines.
Really I'm just looking for suggestions from those with more experience in this area. Do you think this is doable? Which bootloader should I use? Since I have multiple serial devices connected, I use streams, but how would this come into play with the bootloader? Can I specify a particular stream to use when loading the hex file?
Your input is appreciated,
Rob |
|
![](templates/subSilver/images/spacer.gif) |
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Tue Dec 15, 2009 4:38 pm |
|
|
Do you currently use bluetooth only to transmit or also to receive? My problem with receiving serial data through software UARTs always was that they consume a disproportionate amount of CPU time, especially when baud rates are high. _________________ Read the label, before opening a can of worms. |
|
![](templates/subSilver/images/spacer.gif) |
Robotan
Joined: 12 Jul 2008 Posts: 18 Location: Canada
|
|
Posted: Tue Dec 15, 2009 8:17 pm |
|
|
I use bluetooth for both transmit and receive, but this would only be intensive during loading a new program. While the program runs, the bluetooth isn't used much, only to set a few parameters if needed. So I'm not concerned about a software UART hogging the CPU. The question is: would a software UART be reliable enough to use with a bootloader? If so, where should I start? |
|
![](templates/subSilver/images/spacer.gif) |
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Fri Dec 18, 2009 3:25 am |
|
|
Robotan wrote: | The question is: would a software UART be reliable enough to use with a bootloader? If so, where should I start? |
It depends on how you envisage the bootloader being used. My bootloaders and the user application are ships in the night. The PIC is running either the bootloader or the user application. In my system to pass control to the bootloader the PIC must be reset. Once the bootloader is in control it has 100% access to all resources on the PIC. Putting this into your context, if your bootloader used this approach then there would be no problem uing a software based UART. However, if your bootloader shares code with the application, such a startup code, then all bets are off. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
![](templates/subSilver/images/spacer.gif) |
|