New board - looses programming on power recycle

Post Reply
muscas
Posts: 2
Joined: Thu Jul 17, 2014 11:53 am

New board - looses programming on power recycle

Post by muscas » Thu Jul 17, 2014 1:40 pm

Programming a simple blink application from the Pi to the ChipKIT kit Pi works until I power off the Pi and restart. The application is lost, and I have to upload again.

Is this a feature of the ChipKIT kit Pi or have I a faulty board?

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: New board - looses programming on power recycle

Post by majenko » Thu Jul 17, 2014 2:58 pm

It is certainly not a feature of the ckPi, no. I can't imagine the main chip being faulty, that's a very strange behaviour.

All I can surmise is that maybe it is stuck in bootloader mode. You upload a sketch and the bootloader terminates, running the sketch. You reset the board, and the bootloader loads again.

You should check the BOOTLOADER-EN button is actually functioning as it should and isn't permanently pressed.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

EmbeddedMan
Posts: 597
Joined: Tue May 24, 2011 9:24 pm
Location: Minneapolis, MN
Contact:

Re: New board - looses programming on power recycle

Post by EmbeddedMan » Thu Jul 17, 2014 4:44 pm

I concur. It sounds like the bootloader button is always pressed. If you remove jumper JP6 and power cycle, does your sketch run without being re-programmed? If so, then your BOOTLOAD-EN line is being pulled low.

*Brian

muscas
Posts: 2
Joined: Thu Jul 17, 2014 11:53 am

Re: New board - looses programming on power recycle

Post by muscas » Fri Jul 18, 2014 11:14 pm

yes i think there is some board issue as I had it working briefly and now pressing the bootloader and then the reset etc causes the tx/rx lights to flash for a while and then stop, making it impossible to upload any sketch.

Is there a way to avoid the need to use the bootloader button sequence? Having to press this everytime you upload makes the board useless if you require 'field updates' of a sketch via remote access.

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: New board - looses programming on power recycle

Post by majenko » Sat Jul 19, 2014 12:37 am

You could couple the MCLR and bootloader enable pins of the PIC32 to GPIO pins on the Pi. Link the MCLR through a 100nF capacitor so it turns a HIGH -> LOW transition into a pulse to reset the chip, and drive the BL-EN pin low at the same time, and you should enter the bootloader remotely.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

Post Reply