CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Wireless bootloader

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Robotan



Joined: 12 Jul 2008
Posts: 18
Location: Canada

View user's profile Send private message

Wireless bootloader
PostPosted: Tue Dec 15, 2009 11:32 am     Reply with quote

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
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Tue Dec 15, 2009 4:38 pm     Reply with quote

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.
Robotan



Joined: 12 Jul 2008
Posts: 18
Location: Canada

View user's profile Send private message

PostPosted: Tue Dec 15, 2009 8:17 pm     Reply with quote

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?
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Dec 18, 2009 3:25 am     Reply with quote

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!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group