Bricked LPC845 ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bricked LPC845 ?

Jump to solution
1,867 Views
malcolmmacdonald
Contributor II

#MCUXpresso, LPC845, PEMicro Multilink Universal

I have been using a board for a couple of weeks now (our design) with no issues as I get all the hardware interfaces and state changes worked out before applying them to the application code. The last one is a loop going into powerdown mode with a wake-up using WKT, making an ADC measurement, printing it, rinse and repeat (file attached). Nothing too extreme, I thought. Unfortunately, when I ran it, the debug session crashed and, when I tried to restart it, the PEMicro Connection Assistant popped up saying there was an error when trying to make the connection. After this, I tried a previous program which had worked correctly and got the same result. Moving to different HW with the old program with the same PEMicro works. Trying the new program crashes the debug session and "bricks" the board. Trying a second known-working PEMicro also does not allow the connection. So, I now appear to have two boards to which I cannot connect, but no idea as to what I can possibly have done to affect them like this. Have I managed to blow something up? But how? The only line of code which I haven't used previously is 'POWER_EnterPowerDown(0U);'

Has anyone else seen something similar?

(BTW, both MCUXpresso and the PEMicro have the latest SW/FW versions)

Thanks.

 

0 Kudos
Reply
1 Solution
1,792 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @malcolmmacdonald 

 

It is possible to download an image into the flash on the target that will then prevent any further debug access or connections. The first thing to try to recover debug access is to boot into the ISP bootloader. This is normally controlled by the state of ISP pin(s) as the MCU comes out of reset.

About detail please refer to :

https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Regaining-debug-access-to-target-MCU/m-p/473923 

 

BR

Alice

View solution in original post

0 Kudos
Reply
7 Replies
1,848 Views
malcolmmacdonald
Contributor II

Thanks for getting back to me, Alice, but I don't understand your response. The SDK power_mode_switch_lpc example on the breakout board (OK, it's using the onboard debugger rather than the PEMicro) runs with no problems. I get that you can't use the debugger when it is in powerdown. However, that doesn't explain why I can't access the chip once it has executed this code. The problem stays with the board, so either something has been destroyed or something has been written to non-volatile memory.

0 Kudos
Reply
1,840 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @malcolmmacdonald 

 

"However, that doesn't explain why I can't access the chip once it has executed this code"

->> Which code?   power_mode_switch_lpc ? Or your own project?

You can enter ISP mode, use flash magic erase full chip, then debug again.

 

BR

Alice

0 Kudos
Reply
1,804 Views
malcolmmacdonald
Contributor II

As far as I can see (I have never used Flash Magic before) one can erase and reprogram all the program flash. How is that going to allow the Serial Wire Debug to work again?

0 Kudos
Reply
1,793 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @malcolmmacdonald 

 

It is possible to download an image into the flash on the target that will then prevent any further debug access or connections. The first thing to try to recover debug access is to boot into the ISP bootloader. This is normally controlled by the state of ISP pin(s) as the MCU comes out of reset.

About detail please refer to :

https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Regaining-debug-access-to-target-MCU/m-p/473923 

 

BR

Alice

0 Kudos
Reply
1,788 Views
malcolmmacdonald
Contributor II

OK, thank you, I am trying this. Unfortunately, the default FAIM programming is not the correct one for allowing external serial access - we were planning on setting that up at a later stage, but I suppose there is no time like the present! If this resolves the issue, it still leaves the question of exactly what in my code caused it to happen.

0 Kudos
Reply
1,781 Views
malcolmmacdonald
Contributor II
That works, thank you. Now to find out what is different between my code using power down mode and the SDK example...
0 Kudos
Reply
1,855 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @malcolmmacdonald 

 

The mcu doesn't support debug in power down mode.

 

BR

Alice

0 Kudos
Reply