KEIL MCB1700 Evaluation Board Bricked - arm

I have a KEIL MCB1700 evaluation board (NXP LCP1768 uC), that I program with an NXP LCP-Link2 and Keil uVision5.
Things have been running smoothly until I've done some PLL0 configuration tests, willing to speed up the CPU clock. Now I can't program the board anymore : when trying to do so, I get the following message :
"Cannot Reset Target, shutting Down debug session"
"Error, floash download failed - target DLL has been cancelled"
And the build output is :
Load "E:\ARM Examples\Boards\Keil\MCB1700\Demo\Flash\Demo.axf"
Cannot access Memory (# 0x400fc040, Write, Acc Size: 4 Byte)
Cannot access Memory
Error: Flash Download failed - Target DLL has been cancelled
Flash Load finished at 17:12:18
(I've tried to load a demo program to make sure the code isn't the issue)
I've also tried to program another board with the same LPC-Link2 and computer, it worked fine.
Is there a way to force a "factory" restoration of the registers/board ?
Thanx in advance.
Best regards.
Eric

Try to restart the MCU in ISP mode and then program it as usual.
To run the MCB1700 in ISP mode, you should close jumper INT0, press INT0 button and while pressing it, program the board as usual.

Just got an answer from Keil support, works perfect :
"Hello Eric,
if really the last flashed program is causing the trouble, then you can try pressing and holding the INT0 button while pressing RESET button. INT0 asserted should force the chip into bootloader mode and so does not execute the faulty program.
Maybe you also need to disable any reset options in the debug reset and connect configuration:
http://www.keil.com/support/man/docs/ulink2/ulink2_ctx_debug.htm
Then try to connect. Hope, this helps."
Thanx you for helping me though !
Best regards

Related

Program on GD32f103 microcontroller runs only with debugger attached, won't run after reset

I'm using a J-Link EDU Mini debugger/programmer, to upload a simple test program to a GD32f103 microcontroller (the ST32f103 clone/copy). The program is a mere test program, meant to turn an LED on. It's written in SMT32CubeIDE, and here, it is based on the ST32f103.
After uploading the compiled .elf file to the GD32f103 using the J-Kink, the LED turns on just fine. However, once I detach the J-Link and reset the processor, the program appears not to boot, because the LED won't turn on.
What can the source of this problem be?

[Server]Is it possible to detect power button pressed in a program wrote by ourself in Ubuntu 20.04?

I want to run a program on a server.
But I don't want it shoutdown immediately after I press power button.
The expected result is server could finish program properly and get the test result. Then shutdown finally.
The program running environment would be under the Ubuntu 20.04 Virtual Terminals(TTY).
I have tried some methods on the web I found (like change some system files). But it just disabled the power button function. I can't connect how to detect in my program.
I am curious is it possible to detect power button pressed or not in the program we wrote?
If it is possible, how to do?
Thank you very much!
I would have preferred to comment but I don't have enough reputation.
Have you tried to modify the /usr/share/doc/acpid/examples/powerbtn.sh script?
This page seems to describe how to proceed. But I haven't gone deep.

STM32 debugger continues to run after hitting a breakpoint

I'm running a STM32L151 microcontroller with Atollic Truestudio 7.0.1 (Eclipse-based). Connecting to the MCU with the ST-Link/V2 debugger through GDB.
Recently, I've noticed a problem with the debugger although I haven't changed anything in the project configuration. When execution pauses at a breakpoint, I can inspect variables, but the target is clearly still running even though the IDE indicates the debugger is "Suspended". This makes step debugging impossible since the program counter just jumps to wherever it is at the moment instead of the next line of code.
It looks like the target might actually be resetting a few seconds after the breakpoint is hit.
Any ideas as to what can cause this and how I might go about fixing it?
It looks like the target might actually be resetting a few seconds
after the breakpoint is hit.
Then it's probably one of the watchdogs still running when the core is stopped. You can make them stop whenever the core is halted by the debugger with
DBGMCU->APB1FZ |= DBGMCU_APB1_FZ_DBG_WWDG_STOP
or
DBGMCU->APB1FZ |= DBGMCU_APB1_FZ_DBG_IWDG_STOP
whichever is appropriate.

How can I test FASTSRAM from flashing our application file into external Flash chip?

We are working on ARM processors, initially we have developed a chunk of code to test FASTSRAM in our project and we tested successfully in debugging mode. After that we have flashed the same code into flash memory which need to be executed in ARM RAM from here itself. We have done all the flashing procedure successfully. Later on while testing the FASTSRAM after flashing we have got strucked and test got failed.
Can anyone help me out from this issue?

Arduino Leonardo stuck in a loop with infinite keyboard emulation

My Arduino is constantly spitting out keyboard commands after making an accidental error with my code.
Keyboard.write('l');
Now I can't upload any new sketches. I have already tried common Arduino loops solutions like the one from here: How can I "reset" an Arduino board?
The errors I get when trying to upload just before the keyboard starts shooting out code is:
avrdude: stk500_getsync(): not in sync: resp=0x3f
or
avrdude: stk500_recv(): programmer is not responding
It would be great if there is a solution, which wouldn't require buying an external programmer.
Finally fixed it :)
The sync problems were caused due to selecting the wrong board in the compiler.
I was in fact able to overwrite my program as explained in this Stack Overflow question: How can I "reset" an Arduino board?
It did take several attempts to get the timing right, between releasing the reset button and uploading a new program though.
For Arduino Yún users, try uploading via Ethernet/Wi-Fi (menu Tools → Port).
I haven't used a Leonardo myself, but it sounds like the auto-reset may be the problem. Try pressing and holding the reset button, and then (while holding it) upload the sketch.
According to these instructions, you can release the button after the upload has started.
Install ArduinoDroid IDE on the mobile which is available in the play store.
Select the board as Leonardo, connect the Leonardo to the mobile by pressing the reset button on the board and upload the code immediately after removing the thumb on the reset button...
Boom, it worked...
App link: https://play.google.com/store/apps/details?id=name.antonsmirnov.android.arduinodroid2&hl=en

Resources