Author Topic: Oops: Bricked NXP CPUs  (Read 731 times)

0 Members and 1 Guest are viewing this topic.

Offline AussieBruceTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: au
Oops: Bricked NXP CPUs
« on: February 22, 2023, 01:12:20 am »
I have inadvertently bricked (I suspect) a couple of boards containing an NXP LPC2138 CPU. I access them by connecting a Segger JTAG directly to the JTAG pins on the chip, the PINSEL2 register controls whether the JTAG pins are configured for debug (JTAG) or for GPIO. Inadvertently, my code set this register to zero, which sets them to GPIO. Working through RAM this wasn’t a problem, because if I powered down the chip the loaded coded disappeared, and when the chip came back up the JTAG connection was there because default startup setting is JTAG. However, I made the mistake of burning my program to NVR, and it appears that as soon as the chip powers up the code takes over and disables JTAG connectivity. I’ve tried 2 means of connecting through JTAG, neither of them works.

The chip manual states that it is possible to force the mode to JTAG by pulling a particular chip I/O line low (P1.26). However, on this board that pin is not brought out in an accessible way.

I suspect the bricking is permanent, does anyone have any suggestions?


 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4693
  • Country: dk
Re: Oops: Bricked NXP CPUs
« Reply #1 on: February 22, 2023, 01:21:37 am »
as I read the datasheet pulling P0.14 low before boot should enter the bootloader with jtag as long as you haven't set any code protection options
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27865
  • Country: nl
    • NCT Developments
Re: Oops: Bricked NXP CPUs
« Reply #2 on: February 22, 2023, 06:15:08 am »
I have inadvertently bricked (I suspect) a couple of boards containing an NXP LPC2138 CPU. I access them by connecting a Segger JTAG directly to the JTAG pins on the chip, the PINSEL2 register controls whether the JTAG pins are configured for debug (JTAG) or for GPIO. Inadvertently, my code set this register to zero, which sets them to GPIO. Working through RAM this wasn’t a problem, because if I powered down the chip the loaded coded disappeared, and when the chip came back up the JTAG connection was there because default startup setting is JTAG. However, I made the mistake of burning my program to NVR, and it appears that as soon as the chip powers up the code takes over and disables JTAG connectivity. I’ve tried 2 means of connecting through JTAG, neither of them works.

The chip manual states that it is possible to force the mode to JTAG by pulling a particular chip I/O line low (P1.26). However, on this board that pin is not brought out in an accessible way.

I suspect the bricking is permanent, does anyone have any suggestions?
You can always use the serial port bootloader to erase the entire device which resets the security bits as well. Flashmagic is a good software tool for this purpose. Unless you used a BGA package OR connected the 'bootloader entry' pin to the supply voltage, you can solder a wire to the pin and pull it low during boot to enter the bootloader.
« Last Edit: February 22, 2023, 06:26:58 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf