bootloader

Information and discussion regarding the main Firewing development board

bootloader

Postby richardb » Sat Feb 15, 2014 11:36 am

Is anyone else having problems with the bootloading process?

it seemed to work when I first got the board but now seems very erratic but it will still load new firmware occationally
I will try on another computer. and also post the error message
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: bootloader

Postby richardb » Sat Feb 15, 2014 11:54 am

ok the error message is

Please reset the target microcontroller in order to access the bootloader process.


and I've just tried on another pc with the same error message.

obviously it's been working, and it will do this many times then start working again.


I've been using the comport with the included terminal program....
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: bootloader

Postby David John Barker » Sat Feb 15, 2014 3:15 pm

Have you access to pickit3? You could always try reloading the bootloader if you think it has been corrupted. Is the PIC OK? It's a 3.3v part, have you had anything higher on the RX or TX pins?
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: bootloader

Postby richardb » Sun Feb 16, 2014 8:43 am

I'm struggling here, with the combination of new programming software, compiler, board bootloader, and micro, I'm just not sure what is supposed to be happening.

so reprogrammed the bootloader- didn't work

new chip + program bootloader - didn't work


tried to program the chip with simple program directly via the hex file generated in the program folder.- sortof works


do I need to do something to tell the compiler I'm not using the bootloader?
Code: Select all
sub OnStartup() handles PIC.OnStartup
 
end sub

sub main()
   output(d13)
   output(d12)
   while true     
      delayms(1)
      d13 = not d13
      d12= not d13
   end while
end sub


this generates a 10ms high ie 20ms period
d12 never changes and infact seems high impedance.
is this because the bootloader sets the peripherals correctly?

if I change the delay to 10us the high is ~110us

if I change the delay to 1us the high is 17us

if I remove the delay the high is 3.5us high

if I remove "d12= not d13" the hight is 2us

any ideas?
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: bootloader

Postby David John Barker » Sun Feb 16, 2014 9:19 am

> so reprogrammed the bootloader- didn't work
> new chip + program bootloader - didn't work

I find it very odd that using a new chip with bootloader won't work, unless the USB chip that handles 232 communication has been damaged in some way. Are you using the correct loader firmware? For example, R1 won't work with an R2 board and vice versa.

> tried to program the chip with simple program directly via the hex file generated in
> the program folder.- sortof works...do I need to do something to tell the compiler I'm
> not using the bootloader?

The bootloader sets the device fuses, configures the internal clock for 32 MHz and sets RX and TX. If you are not using the bootloader, you will need to configure these manually.
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: bootloader

Postby richardb » Sun Feb 16, 2014 9:43 am

this was what I used for the pic 32

firewing-32-loader-r2.zip


ok so I have loaded usb-firmware.1.1.hex into the usb pic

all seems to be working for now.

what was odd was that it was inconsistent. it would not work 10 times in a row then work a few times I tried closing everything and rebooting powering off but there was no consistency. I had been using the comport and was wondering if that had confused things.
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: bootloader

Postby David John Barker » Sun Feb 16, 2014 9:54 am

OK, so just to be clear - everything is working OK now?
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: bootloader

Postby richardb » Sun Feb 16, 2014 10:21 am

yes but i've only used the bootloader a few times so far
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: bootloader

Postby bitfogav » Sun Feb 16, 2014 12:12 pm

ok so I have loaded usb-firmware.1.1.hex into the usb pic
all seems to be working for now.


Is it possible that the usb firmware was version 1.0? and when using the RX and TX on the main mcu, comms to the mcu used to get corrupted. that is why usb firmware has been updated to 1.1
User avatar
bitfogav
 
Posts: 75
Joined: Sat Nov 17, 2012 11:46 am
Location: UK


Return to Main Board

Who is online

Users browsing this forum: No registered users and 2 guests

cron

x