0
\$\begingroup\$

I have a board with PIC32MX795F512L. The board icsp connector is connected to PGEC1 (pin 24) and PGED1 (pin 25). I accidentaly flashed a hex bootloader (i don't have the source code) used for another project. This bootloader moves programming pins to PGEC2 (pin 26) and PGED2 (pin 27). So now I can't program the pic32 anymore using MPLAB IPE; i can only flash an hex using the bootloader + usb method.

Which code should I write to change PGEC2/PGED2 back to PGEC1/PGED1?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

You should write bit 3 ICESEL of the DEVCFG0 register to zero, according to the datasheet. enter image description here

Here you have some information regarding how to self-write the DEVCFG registers, which is otherwise normally only written by the programmer: https://forum.microchip.com/s/topic/a5C3l000000MaS3EAK/t370179

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.