Questions tagged [pic32]

PIC32 is a family of 32-bit microcontrollers made by Microchip Technology. They contain a MIPS32 core, developed by MIPS Technologies.

PIC32 is a family of 32-bit microcontrollers made by Microchip Technology. They contain a MIPS32 core, developed by MIPS Technologies.

PIC32 microcontrollers have been announced in November 2007

Features include

  • Execution speed up to 80 MHz
  • Flash size up to 512 kByte
  • Programs can be executed from RAM
  • Available in different packages, including Dual in-line (DIP)

A PICkit3 is required to program these microcontrollers. Microchip offers an IDE (MPLAB X) which includes a modified GCC compiler (xc32). It is possible to compile programs for PIC32 using the free mips-elf-gcc compiler as well.

172 questions
4
votes
3 answers

Software interrupt in freeRTOS

I am learning freeRTOS. I need to write software interrupt ISR handler in freeRTOS for PIC32 platform (cerebot Mx7ck). I went through the documentation but no help. Please somebody help.
Main
  • 1,804
  • 3
  • 20
  • 28
4
votes
2 answers

pic32 start bit does not clear -- Basic I2C setup

I am new to embedded programming and am trying to get my first I2C project working. I am using the PIC32MX795F512L. I am pretty much following the microchip datasheet for I2C on PIC32. The problem I'm having is the S bit is never cleared from the…
user36927
  • 41
  • 1
  • 3
3
votes
2 answers

microchip exception handling

While running my program on a microchip ICD3 device, the exception handling looks weird. The program will stop response while exception occurs. While checking the code, I noticed that the default-general-exception-handler.c will create an infinite…
lucemia
  • 6,349
  • 5
  • 42
  • 75
3
votes
0 answers

Minimal PIC32 program is huge

I am trying to get a simple embedded PIC32MX "Hello, World!" program to compile without using MPLAB X. For Chip-support, I am using the spicastack/pic32-parts-free library. Which is as far as I can see, just a redistribution of Microchip's XC32…
Sillydan
  • 104
  • 13
3
votes
1 answer

How to program the PIC32 in Assembly?

I'm trying to program a PIC32 MM0064GPL028 in Assembly, to do MIPS32 exercises on a real CPU, instead of the simulator that we use in my course (QtSpim), without any success. The only guide I found on the internet is this, but I get an error when I…
Lugerp
  • 31
  • 2
3
votes
2 answers

Cant see printf in mplabX IDE anywhere... Why?

I tried this in a function, but I dont see anywhere the result in MPLAB X IDE. Why? Where I can find the printed result? I am using pic32 Curiosity development board and XC32. int a = 5; int b = 10; printf("a = %d\nb = %d\n", a, b); Any info?…
3
votes
2 answers

How can one create a unique label for each macro call using mips assembly in MPLAB X

I have a macro which performs a comparison, and jumps to the end of the macro if that comparison isn't true. Here is a simplified example: .macro do_work_if_value_not_zero value li s0, value bne s0, zero, exit_label nop // Do…
3
votes
1 answer

parse and replace NaN values before sprintf()

So I've got a compiler bug with their low level _fconvert() function that the vendor has marked as low priority, but the effect is that the embedded system will crash if I send a NaN value to a printf() style function. I'd like to write a wrapper…
grambo
  • 283
  • 2
  • 10
3
votes
2 answers

Microchip Starter Kits with SPI mode

I want to use microcontrollers for communicating data by SPI. So, I have chosen firstly the Microchip USB Starter Kit III module which has a PIC32MX470F512L. I tried several ways to code its SPI, but only the clock signal SCK can be seen on an…
Dey
  • 33
  • 2
3
votes
2 answers

pic32 jumping out of bootloader causes general exception

I have an mplabx project with a custom bootloader and application for the PIC32MX795F512L. All throughout its development, I have been jumping from the bootloader to the application with no problem using the line: ((void…
user545199
3
votes
2 answers

Pic32 bootloader writing to memory

I am having issues getting a bootloader for the PIC32MX795F512L working. I based it off of the example code on the microchip website. Here is the section of code that I have that should write the memory, I have verified the bootloader up to this…
user2076574
  • 166
  • 3
  • 12
2
votes
3 answers

MPLAB X IDE v6.10, when i try to load my projects and open it. it gives an message "Loading" and the project doesnt open & the debugger is disabled

In MPLAB X IDE V6.10, Initally it is working fine. But after sometime when i tired to open project it is showing loading but project is not opening. And Uploading and Debugger option is disbale can't able to click and do upload the program. Even…
2
votes
4 answers

Bit-packing Problem in a Union (Register Mapping)

I am trying to get a union together to map out some bit fields in a register map. The code I have is the following: typedef union __attribute__((packed)) { struct { uint8_t MODE:3; uint8_t VSHCT:3; uint8_t VBUSCT:3; …
awb
  • 185
  • 1
  • 7
2
votes
0 answers

PIC32 8 bytes on static variable

For some reason, when I give these two variables the "used" attribute, the compiler makes them 8 bytes long. Without it, the compiler optimizes them away as I don't use them (yet). Anyone knows why this is? And are any workarounds for this…
Oscar K
  • 185
  • 1
  • 11
2
votes
0 answers

can data from a sensor be read in a function

I am using the icm 20948 sensor, programming on MPLABx running harmonyV3.i2c is communication mode. Can I read and write in a function, does it have to be in a while loop? For example would: while(SERCOM1_I2C_IsBusy())…
1
2 3
11 12