Hi
I'm working with TWRK60F120M. I'm using eclipse IDE, with gcc compiler, GDB + openocd for debugging.
My debug interface is osbdm.
I wrote a simple code and I flash it into the device. The code runs perfectly.
After that I powered off the device e re -powerd it on. The code doesn't run.
I saw with the oscilloscope the reset-b signal and it is floating between 400mV and 1.88V
I think that the watchdog resets the cpu (because it is enabled by default ). My code disables watchdog at startup, but
I think that after a poweron it fails to execute wdog disable because it is resetted before.
I read a lot of discussion about this problem, that can be caused by several reasons
I saw with the oscilloscope the EZP_CS signal and it is high (the device doesn't enter in EzPort mode).
Do you have any suggestions?
Hi Angelo,
some users met similar problem because they download the code in RAM but not FLASH. Please check this point on your side also.
I also suggest you connect the board with "Attach".this will connect the board without erasing flash. then check flash memory if code is correctly programmed.
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jennie
thanks for your reply.
I had already tried the attempt that you suggested ( using OPENOCD for flash memory dump)
The code has been downlaoded in flash, and after poweron, I have noticed that flash is programmed , but the code doesn't run.
Maybe there are some problems with my compiler options (This is my compiler string :arm-none-eabi-gcc -std=c99 -O0 -g -c -fmessage-length=0 -mcpu=cortex-m4 -mthumb -ffunction-sections -fdata-sections -ewl_noio).
I have also noticed that I can't read flash memory from address 0x100_0000(MDM-AP Status Register) ,but I don't know if this is a normal work, because this is the first time I work with Freescale devices.
Executing flash memory dump I have also noticed that device is not locked (addrees 0x40c =0xFE)
Do you you have any further suggestion ?
Thanks for supporting me
Angelo