chipKIT® Development Platform

Inspired by Arduino™

Resurrecting Old DB32 Project

Created Wed, 30 May 2018 00:14:57 +0000 by biomurph


biomurph

Wed, 30 May 2018 00:14:57 +0000

Hi, I've been working with chipKIT for years. I built the OpenBCI on your work and I love the support.

So now, I am trying to bring an old project back to life. It used the PIC32MX250F128B chip, and back then I bootloaded it with the DP32 bootloader hex which it now seems is off the menu? https://github.com/chipKIT32/PIC32-avrdude-bootloader/tree/master/BootloadersCurrent-hex

So here's the current problem. I have my custom board, built off of the DB32 with no pin changes, and bootloaded with the DB32 hex. When I go to the latest Arduino, I have to select the USB Devices flavor. I select "Serial" because I don't need the other ones. Then I upload successfully. Yay! but no. The board appears only briefly on the serial port (Macbookpro). It appears that the port number keep incrementing, and I find myself chasing the numbers as they increase... Is there something that I need to change in my old code to make it compatible with the new core? Also, Where is the DP32 hex? Is there another hex that I should use? I see the UDB32_MX2_DIP.hex which is what I use for OpenBCI, and uses the same chip, but I also don't see the generic UDB32_MX2 in the board select file in the arduino IDE....

So, here's a link to the firmware that I'm trying to bring back to life. It targets a PIC32MX250F128B IC, and has two peripherals on the SPI bus (EEPROM and Sharp Memory LCD Screen) not much to it. https://github.com/biomurph/HeartBone/tree/master/HeartBone%20Firmware I can put the thing into bootloader mode (holding the prog button down while press/release reset) and then the serial port is stable enough to upload successfully. Once uploaded, I can communicate over serial (USB) no prob, albeit briefly, but the darn thing won't print on to the LCD screen. Also, all of a sudden the serial port is lost because the hardware seems to increment the port number.

I can't find the old DP32 bootloader online, and I'm using one that is likely from about the middle of 2015. My next step is to bootload with UDB32_MX2_DIP and then see what happens. I know that you guys did some upgrades to the whole hardware<>Arduino IDE interface, especially surrounding USB profiles, so if you have any insight I would love to hear it.

Cheers!


majenko

Wed, 30 May 2018 09:08:24 +0000

The bootloader for the DP32 (I assume that's what you mean) is on Digilent's site: https://reference.digilentinc.com/reference/microprocessor/dp32/start

As far as USB goes - all I can guess is that your program is resetting while some software has the port open on the computer, which causes a new port to be created with an incremental numeric suffix.

I would suggest trying one of the basic serial demos (I usually just print millis() in loop() with a 1 second delay as a test) and see if it's more stable. If so, then it's your old code that's making it crash and reset (?). Otherwise there's something other that's screwy. Maybe watching dmesg -w (or whatever the OS X equivalent is) to see if it's constantly disconnecting and reconnecting all the time.


EmbeddedMan

Wed, 30 May 2018 19:23:46 +0000

The Diglent based boards have their bootloaders stored in a Digilent GitHub repo : https://github.com/chipKIT32/chipKIT-digiboot/tree/master/BootloadersCurrent-hex

There you can find the DP32 hex file if you still want it.

*Brian


biomurph

Thu, 13 Jun 2019 16:19:20 +0000

Hello again, Yup, I'm stabbing at this problem one last time. Turns out, Microchip has abandoned the PicKIT 3 programmer. I've tried to use my PicKIT 3 but for some reason it won't work. So, I upgraded to the latest MPLABX and got a PicKIT 4.

I'm trying to load the DP32 HEX file, which I've downloaded from the digilent github repo. The MPLABX reports that the 'Programming/Verify complete', but I don't get the expected LED blink on the PGD pin. Also, I don't see the chip appear on my list of serial ports.

Some other strangeness, the MPLABX as me turn down the speed of programing to low. It also has trouble in the erase process, and fails at that point, so I have to tell it not to erase the chip prior to upload. I can't put the DP32 into bootloader mode by pressing the RESET and PROGRAM buttons correctly...

I am targeting a PIC32MX250F128B IC, and the MPLABX does confirm that it can find the target.

It does look like the DP32 has been abandoned. I guess I need to port the project to a more reliable device, but I just don't understand why the old bootloader won't work. Any assistance will be appreciated.


GastonLagaffe

Fri, 14 Jun 2019 09:27:53 +0000

Salut,

this sounds strange - I have used the PixKit3 yesterday with MPLAB X IPE v5.20 and it worked without any issues flashing the PIC32MX250F128B. I will see if I can get my DP32 to test. I recognized that in my configuration, I had to physically reconnected the PicKit3 after the start of the MPLAB IDE

Ciao, Mathias


majenko

Fri, 14 Jun 2019 09:28:24 +0000

Some other strangeness, the MPLAB-X as me turn down the speed of programming to low. It also has trouble in the erase process, and fails at that point, so I have to tell it not to erase the chip prior to upload.

That sounds like you have a hardware issue with your circuit to me. Can you share images and schematics of your setup?