Microchip PIC32

From SEGGER Knowledge Base
Jump to navigation Jump to search

The Microchip PIC32 microcontrollers are 32-bit microcontrollers based on MIPS or Arm processor architectures, depending on the PIC32 device family. They are designed for a broad range of embedded applications and combine high-performance processing capabilities with integrated memory and a comprehensive set of peripherals.

The PIC32 portfolio includes several device families, such as PIC32MX, PIC32MZ, PIC32MM, and PIC32CK. Depending on the device, features include different CPU cores, clock frequencies, Flash and RAM configurations, as well as peripherals for communication, timing, analog signal processing, and general-purpose I/O.

PIC32 devices provide dedicated interfaces for programming. These interfaces can be used to download application software.

This Knowledge Base article describes the relevant characteristics of PIC32 microcontrollers and provides information required to use SEGGER tools for programming PIC32-based target systems.

Supported devices

Refer to the supported device list for a full list of all supported PIC32 family devices, their corresponding names and connection diagrams.

Target interfaces

Interface J-Link support Flasher support
ICSP NO.png YES.png

Flash banks

PIC32

Flash bank Base address J-Link support Flasher support Loader
Name Bank size
Program memory 0x1D000000 NO.png YES.png Default Up to 2048kB


Config words

The config words are used to configure the device and to protect the memory against unintentional readout. The various Microchip PIC devices differ significantly in the config words. Please consult the corresponding data sheet of the device for more information.

When the config words are present in the data file (HEX, SREC, BIN, ELF...) they are used after Programming/Verify is finished. An indication of which config words were used is displayed at the end of the programming process with the corresponding "VerbosityOutput". As soon as there is at least one config word in the HEX file, it is used, and ALL other settings in U-Flash are ignored.

Many PIC devices have unimplemented configuration bits. When the device is read, these bits are output with a value of 0. In many HEX files, however, these unimplemented bits are set to 1. To prevent unwanted errors during verification, these unimplemented bits are masked out.

caption

How to connect a device

After the device has been selected in U-Flash, you can display the connection assignment via "show wiring"

PIC32MMxxxFxxx.svg?.png

The wiring on the target side must be taken from either the boards circuit diagram or the corresponding data sheet.

caption

Troubleshooting

Device ID does not match

At the start of programming, the Flasher tries to connect to the device and to read out the device ID. Each PIC device has a unique ID.

If an error is output regarding the device ID, this can have several root causes.

To obtain detailed information on the error, increase the "VerboseOutput" in the U-Flash configuration to at least "INFO" and transfer the project to the Flasher again.

caption

Device ID = 0000000 or FFFFFFF

  1. There is a fault in the wiring
  2. The device is kept in reset by an external reset generator or watchdog
  3. The supply voltage is insufficient

Device ID is wrong

  1. The wrong device was selected in U-Flash
  2. There is another device on the board assembled
  3. The supply voltage is too low and/or the ICSP speed is too high