chipKIT® Development Platform

Inspired by Arduino™

Debugging with ejtagproxy and GDB

Posted 2013-02-25 13:52:36 by Majenko

Debugging without MPLAB is possible through ejtagproxy. You need a compatible ICSP adapter, like PICkit2 or PICkit3 (full list of compatible adapters is available on project homepage). Note that you can't use PICkit2 with MPLAB, but it works with ejtagproxy. Obtain source, build. Obtain stock GDB source. Configure with --target=mipsel-elf32 . Build. Start ejtagproxy:

$ ejtagproxy
GDB proxy for Microchip PIC32 processors, Version 1.0.25
Copyright (C) 2012 Serge Vakulenko

EJTAGproxy comes with ABSOLUTELY NO WARRANTY; for details
use `--warranty' option. This is Open Source software. You are
Read more -->

Programming Microchip starter kits from MPIDE

Posted 2013-02-25 13:37:53 by Majenko

Running on Microchip Starter Kits

MPIDE has been expanded explicitly to support all of the Microchip starter kits such as:

  • PIC32 Starter Kit
  • PIC32 USB Starter Kit
  • PIC32 Ethernet Starter Kit
  • Explorer 16 Starter Kit

Currently for all of these boards you will need some sort of USB to serial adapter. For all but the Exp-16 I use an FTDI cable that breaks out to pins. I connect those to pins on the expansion board for uart1. The PIC32 USB Starter Kit and PIC32 Ethernet Starter Kits are also compatible with the USB PIC32 bootloader.

Read more -->

Changing PWM frequency and bit resolution

Posted 2013-02-16 14:34:51 by Majenko

Overview

You have to bypass the analogWrite function in the abstraction layer and talk directly to the hardware to do this. You will need to program one of the timers, and one or more of the output compares to do this. The Output Compare units in the PIC32 can work from either Timer2 or Timer3. The analogWrite code uses Timer2. If you don't need analogWrite to work, I would use Timer2. If you need analogWrite to work as well, use Timer3. The Output Compare sets the pin when the timer resets. The timer then counts up from 0. The Output Compare resets the pin when the the value in the timer matches

Read more -->

Using USB

Posted 2013-02-16 13:58:00 by Majenko

The PIC32MX3xx series parts do not have a USB controller. The other PIC32 series (i.e. PIC32MX4xx/5xx/6xx/7xx) all have a USB controller. The Uno32 uses a PIC32MX320F128H and therefore does not have a USB controller. The Uno32 and Max32 have standard FTDI serial to USB interface chips (FT232R) to keep consistent with the Arduino way of interfacing. However, it is also nice to be able to use the built in USB port. Many other PIC32 boards have this USB port brought out to a standard connector such as the Microchip USB Starter Kit and the Digilent Cerebot 32MX4 and Cerebot 32MX7. The latest version of HardwareSerial.cpp now supports the first serial port (Serial.begin(),

Read more -->

About PIC32 Interrupt Vectors

Posted 2013-02-16 13:48:19 by Majenko

This is a dump of the interrupt vector from the Max32 (32MX795F512L) It gives you an idea what is available and what is already in use.

Arduino-32MX795F512L>V show interrupt Vectors
FLASH_PROG_BASE=9D000000
EBASE          =9D000000
IntCtl         =00000020
VectorSpacing  =00000001
+++ 0= 02 00---0B4017F0 jump 9D005FC0  _CORE_TIMER_VECTOR
+++ 1= 00 00---FFFFFFFF unused         _CORE_SOFTWARE_0_VECTOR
+++ 2= 00 00---FFFFFFFF unused         _CORE_SOFTWARE_1_VECTOR
+++ 3= 00 00---FFFFFFFF unused         _EXTERNAL_0_VECTOR
+++ 4= 00 00---0B401E5A jump 9D007968  _TIMER_1_VECTOR
+++ 5= 00 00---FFFFFFFF unused         _INPUT_CAPTURE_1_VECTOR
Read more -->

1 ... 32 33 34 35 36