Created Sat, 16 Feb 2013 13:08:03 +0000 by BerndK
Sat, 16 Feb 2013 13:08:03 +0000
Thanks very much for supporting MX1xx and MX2xx PIC32 :D
I build a Board with an PIC32MX150 28 Pin DIP Version.
> some minor changes to the new bootloader (Oscilator settings - using the intern one - , Prozessor Type, Flash size, LEDs) and it worked fine. I used BOARD_EXAMPLE_MX1 as a basis. Thanks very much for this great job.
> With the MPIDE i used "cerebot_ga4" as a basis for customizing my board. in board.txt I needed to change:
cerebot_ga4.ldscript to =chipKIT-application-32MX120F032.ld (not ..120F032D.ld)
cerebot_ga4.upload.maximum_size to =122880 (128k - 8k reserve for whatever)
cerebot_ga4.build.mcu=32MX250F128D thats not the MCU I use but ..MX150F128B is not supported by the bootloader... Error Message:" avrdude: AVR Part "32MX150F128B" not found."
does anybody know, what to do? :?:
Even though this settings are not optimal, the bord works (allmost fine).
> In Bord_Defs.h I just changed: #define NUM_DIGITAL_PINS from 30 to 31 (Pin count starts with 0) to get access to Pin 30 (RA4) wich is the boot button and also used in my sketch No changes in Bord_Defs.c
> Digital Input/Output tested -> LEDs are blinking -> works fine. :)
> Serial.print ... tested -> works fine 8-)
after configuring UART1 pins RX and TX in setup() U1RXR = 0x1; //mapping RB6 to RX1 (Pin 15 on PIC21MX150F128B) RPB7R = 0x1; //mapping TX1 to RB7 (Pin 16 on PIC21MX150F128B)
> Wire (i2c): got it working -> great :D but:
After initialising i2c with Wire.begin(4); digital Pins 24 (RA0) and 25 (RA1) do no more work as output (LEDs stop blinking on these ports). No trouble with RB2 (ouput) or RA4 input. :?
initialising i2c (Wire.begin();) before initialisind Digital Pins (pinMode(..)) does not work. -> I get no communication onn i2c bus. At first I thouged Wire would not work :shock: When I moved Wire.begin(..) beyond initialising pinMode(..) it worked! :o
I use Wire with a PIC32MX440F256H - wich I customized to - and I do not have this problens.
Any hints? :?:
Sun, 17 Feb 2013 13:39:28 +0000
One Problem solved:
..MX150F128B is not supported by the bootloader... Error Message:" avrdude: AVR Part "32MX150F128B" not found."
In "avrdude.conf" I just copied the Section for the
"Pic CPU PIC32MX250F128D added by Brian Schmalz, May 2012"
part id to = "pic32-150-128"; desc to = "32MX150F128B";
It works: :)
The strange behavior at ports RA0 and RA1 still remains! :(
Sun, 17 Feb 2013 15:26:56 +0000
It is interesting that you ran into the same problem I had about a month ago (Not using MPIDE but MPLAB). It is a problem with the chip seen in the Errata sheet for the MX1/2 chips.
See this link to ensure it is the same problem: http://www.microchip.com/forums/tm.aspx?m=697846
The work around was setting the DISSL bit (I2C1.<9>) and the voltage will go back.
Also, are the changes above the only changes you needed to get it to work with MPIDE? I would like to be able to use MPIDE with my PIC chips, and would like to use some of your work to do it.
Hope it helps you out,
Sun, 17 Feb 2013 18:21:16 +0000
I2C1CONbits.DISSLW = 1; and it works fine! :D
Thank's a lot.
What I described above were the only changes I had to do. Very important is to use the latest version of the bootloader source and the latest version of MPIDE (20121013).
In addition I adopted pin maping in the MPIDE variants files Board_Defs.h and Board_Data.c to my Bord (PIC32MX150F128B 28 pin DIP version) today. With these settings I do not need to configure Perihperal Select Pins for UART1 in the sketch setup().
What PIC chips do you use? If it are the same as I do, I could provide bootloader and config files.
Sun, 17 Feb 2013 22:49:09 +0000
Glad to hear that it worked. I was using the MX250, but I have a few MX150s that I would prefer to use with MPIDE. So I guess the setup would be the same.
Is there a bootloader in the repository for the MX150 or did you create one yourself? If you created it yourself I would appreciate if you could send me a copy, but if not could you just please direct me where I could download it from.
Mon, 18 Feb 2013 01:05:40 +0000
Here is the Github repo :[url]https://github.com/chipKIT32/PIC32-avrdude-bootloader[/url]
You may find some more information here: [url]http://www.chipkit.org/forum/viewtopic.php?f=6&t=1824[/url]
I used BOARD_EXAMPLE_MX1 as a basis and made some changes to BoardConfig.h (see attachment). I also attached the MPIDE variant files Board_Defs.h and Board_Data.c. It is better to use the chipKIT-application-32MX250F128.ld than chipKIT-application-32MX120F032.ld linker skript. I chagned this in the boards.txt file.
Hope I could help.
If there is anything wrong with my files, please tell me.
Mon, 18 Feb 2013 01:09:49 +0000
Sorry, max three Attachments.
Here is the part of the boards.txt file I added.
Tue, 19 Feb 2013 21:05:39 +0000
SPI and DSPI tested.
After initialising the PPS Pins ..
SDI2R = 0x3; //SDI2 := RB13 RPB11R = 0x4; //SDO2 := RB11
everything is fine.
At present I use the MX150 with Digilent Pmod NIC100 as a Web server. Some minor changes to the Digilent DNETcK library and configuring PPS INT1 Pin
INT1R = 0x2 ; //INT1 := RB0
Sun, 02 Aug 2015 05:51:05 +0000
I have started playing with PIC32MX150F128B and new with double SRAM (64KB) PIC32MX1F256B.
I am relatively new to internal MPIDE setup as far as new controllers are concerned.
Anyway, have managed to follow this thread and successfully installed serial UART bootloader for MX150, appears to work on MX170 as well.
At this early stage of testing, I can upload sketches OK.
However, Serial1.print () works OK on UART 1 port pin 21, but I can't get Serial1.read() pin 22 to receive anything even though the receive pin works OK with bootloader. Have checked with scope and am getting correct data at the receive pin 22.
Would appreciate any advice on possible MPIDE 0023 configuration issues.
Also if anyone has an updated configuration files for MX170 or advice how to change MX150 files to support full 64KB of RAM in MX170.
Best Regards JohnL
Managed to find a definition file and found that Serial1 is actually mapped on pins 10 and 14. Serial1.read() works OK on pin 14 Rx. But Serial.print also works on pin 21 as well as pin 10.
Issue MX150 (not tried MX170), reset button alone enters bootloader mode? FIXED, PROG HIGH should be pin 16 with the bootloader I'm using.
Still looking at way to modify bootloader baud rate from 115200 to lower rate 19200 ?
Would appreciate any help.
Fri, 17 Jun 2016 10:03:02 +0000
Revisiting MPIDE and PIC32MX150F128B after long absence, unfortunately lost all previous information with old comp.
Is there a working UART bootloader Hex file for PIC32MX150F128B using internal RC oscillator and supporting configuration files if not the same as in this thread?
Fri, 17 Jun 2016 10:14:13 +0000
Is there any MPIDE support for MX150 or MX170 B(28 pin DIP) or D (44 pin TQFP) parts with internal RC oscillators and UART bootloaders?
Fri, 17 Jun 2016 11:08:55 +0000
Looks like I have successfully flashed a UART bootloader from this thread for MX150f128B. Appears to pulse pin 7 (RB3) at 4Hz when placed in boot mode (RB7 High + RST). [url]http://chipkit.net/forum/viewtopic.php?f=17&t=2438[/url]
Does anyone know if there are MPIDE configuration files for this setup?
Sat, 18 Jun 2016 10:52:30 +0000
... Still looking at way to modify bootloader baud rate from 115200 to lower rate 19200 ? Would appreciate any help. ... JohnL
the baud rate ist defined in the bootloader. You have to change it in the .c -file.
The upload speed is defined in boards.txt. Baud rate and upload speed must be the same. I posted the changes I made to the boards.txt file in this thread.
Sat, 18 Jun 2016 11:08:52 +0000
Looks like I have successfully flashed a UART bootloader from this thread for MX150f128B. Appears to pulse pin 7 (RB3) at 4Hz when placed in boot mode (RB7 High + RST). [url]http://chipkit.net/forum/viewtopic.php?f=17&t=2438[/url] Does anyone know if there are MPIDE configuration files for this setup? Thanks
All the MX150 and MX250 boards supported are using a crystal oscilator as far as I know. But this should not be a problem because these settings are made already by the bootlader.
If you use a MCU that is not supported by the avrdude.conf file you have to add an appropriate entry to avrdude.conf. Just copy one of the Mx150 or MX250 entries as discribed in this thread. I am working with an 32MX150F128B so I copied the PIC32MX250F128B and just changed id and desc as discribed above.
here are the config files I use for 32MX150F128B DIP
Hope it helps you out,