Skip to main content
Topic: Dspic can't find UART Bus pirate Bootloader (Read 14158 times) previous topic - next topic

Dspic can't find UART Bus pirate Bootloader

I have received my Buspirate 3.5 free PCB few days ago, and have started making it on the same day. I soldered whatever part I had, either exact value, or nearer value. I've picked passives from dead motherboard, ipod etc.
Next challenge was to make a Pickit2 myself to program the pic24 of buspirate. I had many problems with it, but Rohit De Sa helped me a lot and I now have a working PK2clone. Tonight I've programmed "BPv3-Bootloader-v4.4.hex" successfully(verified too) to the pic24 by pk2. Now I see whenever I touch the PGC pin with metal tweezers, VREG and MODE both LED glows for a second. Looks like programming successful.
Next I had to install the firmware.
My board lacks the 4066 and the ft232rl as they haven't arrived still from element14.
I've looked upon schematics and fond that the pic24 is connected to ft232 by 4 signal lines as Tx Rx CTS RTS.
I have a working USB to TTL and RS232 converter. I've hooked up those 4 pins from that module to respective pins of pic24 and common ground is achieved by USB port's grounding.
[attachment=0]000_0024[1].JPG[/attachment]
When I run DS30 loader GUI and try to download the firmware, it fails and shows
Code: [Select]
Searching bl..........timed out 
Tx 20bytes/Rx 0bytes/5.1s
What could be the problem? Can anyone guess?
My BP module still has the cute feature when I touch PGC, two LED's blink for 1 second. :)
Still learning
-Arup

Re: Dspic can't find UART Bus pirate Bootloader

Reply #1
[quote author="arupbsk"]whenever I touch the PGC pin with metal tweezers[/quote]You need to short the PGC pin to the PGD pin during power-on. This will put the BP into bootloader mode. Once into the bootloader, you can use ds30Loader to update the firmware.

Just a piece of info - for 'normal' modes, the BP doesn't require RTS and CTS. I don't use these pins at all on my DIY BP.
Cheers!
Rohit

Re: Dspic can't find UART Bus pirate Bootloader

Reply #2
A new headache:
see http://snpr.cm/b1k32G.png
Still learning
-Arup

Re: Dspic can't find UART Bus pirate Bootloader

Reply #3
Someone help me. More and more I am trying, the worse it becomes.
Now, ds30 loader GUI says,
Code: [Select]
Searching for bl . 
Found PIC24FJ128GA108 fw ver. 9.9.9
Wrong pic detected(227)/selected(212), aborting
Still learning
-Arup

Re: Dspic can't find UART Bus pirate Bootloader

Reply #4
You've used a 64GA002, right? Start from step 1:
-Reprogram the PIC with the bootloader.
-Read the PIC once again. Check the checksum of the hex to verify.
-Check that power supply is OK.
-Check that Rx and Tx of PIC are properly connected to Tx and Rx of USB-UART.
-Connect a 'proper' ground wire from the USB-UART to the PIC (don't rely only on internal USB grounding)
Cheers!
Rohit

Re: Dspic can't find UART Bus pirate Bootloader

Reply #5
I have PIC24FJ64GA002 It was shown correctly first as the screenshot link shows. But I've gone to every tab of the DS30 software and may have done something bad, and it is now detected as PIC24FJ128GA108 by ds30. In Pickit2 it is detected as PIC24FJ64GA002.
Still learning
-Arup

Re: Dspic can't find UART Bus pirate Bootloader

Reply #6
It sounds like there is a pro lem between the pic and ft232. The pickkt2 sees the pocket OK so power and connection mist be.good. the bootloader doesnet get the reply,so I would guess the pic to ft232 connection is bad
Got a question? Please ask in the forum for the fastest answers.

Re: Dspic can't find UART Bus pirate Bootloader

Reply #7
You'll receive that error when the Buspirate isn't in bootloader mode but in normal mode. You could also accidentially overwritten the bootloader. Try to program the buspirate with a pickit or icd.

@ian: on the tab? :P

Re: Dspic can't find UART Bus pirate Bootloader

Reply #8
@sjaak Ian with a broken keyboard :P

So, should I burn the "BPv3-Bootloader-v4.4.hex" file again to the PIC24FJ64GA002 by PK2?
Or is there a newer bootloader available? (my BP is 3.5 SOIC version)

@ian,
Quote
pic to ft232 connection is bad
Quote
The connection is soldered directly as you can see in the picture, no chance of loose connection, and there is no dry solder too.

I guess my USB to TTL and RS232 adapter isn't FT232 based. It has MAX211 level converter for sure, but the USB to UART IC is a COB chip which doesn't have any name. But I don't think BP design is solely dependent on specifically FT232. Is it?
Still learning
-Arup

Re: Dspic can't find UART Bus pirate Bootloader

Reply #9
@sjaak
Reprogrammed, and verified too http://snpr.cm/r2jRhY.png
Still learning
-Arup

Re: Dspic can't find UART Bus pirate Bootloader

Reply #10
I've tried with a different UART. I've hooked up TX and RX as well as 3.3V supply and GND to BP from Launchpad.
[attachment=0]000_0030[1].JPG[/attachment]
DS30 says
Code: [Select]
Searching for bl . . . . . . . . . . . . . . . . . . . . timed out
@Rohit, this proves that the words you said
Code: [Select]
Just a piece of info - for 'normal' modes, the BP doesn't require RTS and CTS. I don't use these pins at all on my DIY BP.
is wrong. The BP requires those other two PINS.

I've tried with both disabling and enabling FIFO buffers in COM port and with 9600 speed.

Can someone upload here a READ of a working buspirate3.5?
I need a hex file that has the bootloader and firmware of latest version.
Can someone read the complete code from a working buspirate and share here? I'll just burn the hex file to my BP using PicKit2 for less hassle of ds30.
Still learning
-Arup

Re: Dspic can't find UART Bus pirate Bootloader

Reply #11
That one is the latest and should also be used in the production version of the bp v3.

I only said it could be overwritten. During codeing and testing of the bootloader i also made a goofup and had a simular issue. Also during nummerous hours of coding on the buspirate I sometimes forgot to place the jumper and saw simular output. Please check if the bootloader is present, the pgc and pgd are shorted properly.

The rts and cts is not used in the buspirate, however they are connected to the pic24. It coudl be your usb to serial convertor uses these?

In the svn should be a production-image (bootloader+main) for the buspirate.

Re: Dspic can't find UART Bus pirate Bootloader

Reply #12
Sorry, was walking and typing on phone. Fat fingers....

The Bus Pirate never requires RTS and CTS. The bootloader is fixed at 115200bps.

The latest production dump (bootloader and firmware) is here:
http://code.google.com/p/the-bus-pirate ... ufacturing

Does the MODE LED light when you start with the jumper between PGC and PGD? Does it light without the jumper?
Got a question? Please ask in the forum for the fastest answers.

Re: Dspic can't find UART Bus pirate Bootloader

Reply #13
The VREG and MODE light only lights when PGC and PGD are short by jumper. After I remove jumper, it remains glowing for about 1/4th of a second.
http://www.youtube.com/watch?v=hJTYbwiYalc
When I connect USB, PWR led glows and VREG LED blinks once about 1/10th second duration.
Still learning
-Arup

Re: Dspic can't find UART Bus pirate Bootloader

Reply #14
I've burned the dump file as suggested by Ian.
I was getting verify error, so decided to raise the +3.3V VCC a bit, I supplied it 4Volts, which was read by PicKit2 software as 4.1V. Then programming and verification succeded.
The operating voltage of the 24FJ64GA002 is  2 to 3.6V as told by Microchip website, but it's fun when I prove them wrong. My PIC survived the programming at 4.0 Volts.
Proof: http://screensnapr.com/e/kU8ayC.png

Now, when I power buspirtae, the PWR led glows fixed (as it should glow)
The VREG and MODE LED glows and remains glowing if I power on with jumper in PGC and PGD. Otherwise they are off.
Still learning
-Arup