Hi All,
I'm using a DEMOQE8 board and was going through build/debug phases until yesterday when I received the message "Device is secure. Erase to unsecure?" (Error 14 in the console). I know the PSU is ok, it's actually using USB power at 3.3v for the QE8. The board has a P&E multilink on it so the BDM is via the PCB, no wires etc. I'm using CodeWarrior (eclipse) 10.6. I don't even know where the settings are to secure/disable mass erase in CodeWarrior, so I've definitely not set them myself but some how they've become set? I tried to create a flash programming target task to simply dump the flash to a file but when run it gives me the same message!
Has the chip died or is there some way to unsecure it again???
Thanks,
Ian
Hi Ian,
One more thing , please make sure in your "Flash programming" Target task setting that you have selected the correct micro controller as Target.if it's not correct in that case also you will get Error 14 cause every MCU has it's own .s8p file (Initialization file)
Thanks and Kind Regards,
Robin
Hi Robin,
Thank you for your reply.
Yes I did see that error 14 is related to the flash algorithm file so I checked the path and I can see the contents of the file. In the post you referred to the poster had renamed the CodeWarrior directory but I haven't done this. In fact the install was a fresh install. However, it does say at the bottom of the post that the start up file needed changing but it doesn't say how or why?
Indeed I had selected the QE8 device when I created the flash programming target task.
What's throwing me is that it was working fine a few weeks ago and I'd not made any changes to the code, just simply re-flashed it to the DEMOQE8 to check the program still worked, which it did. I then was messing with changing the internal clock to an external 32.768KHz crystal via the debugger and indeed swapping the crystal (while powered up). I saw everything work and then needed to change my code, rebuild and it was at that point when I hit debug that I saw the message. The external crystal was still connected at this time but of course it would have used the internal clock from reset etc.
Do you have any further suggestions? Either the P&E interface has died or the chip is broken. What I will try at the weekend is using a USBDM connection to the board and that will rule out one or the other hopefully.
Thanks,
Ian
Hi Ian,
Please have a look to this may be helpful
http://mcuoneclipse.com/2012/05/28/device-is-secure/
How (not) to Secure my Microcontroller | MCU on Eclipse
Thanks n Kind Regards,
Robin
Hi Robin,
Thank you for all your suggestions so far, appreciated. Sadly the last mcuoneclipse posting was not relevant to my issue as the poster had plugged the wrong board in but received the same error as me.
I've just tried Control+F11 and for the information the console window had the following in it:
Starting 3rd party flash programming...
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : SPECIFY_NETWORKCARD_ENABLED, Value : 0, R) => DI_OK
INF: Copyright 2012 P&E Microcomputer Systems,Inc.
INF: Command Line :"C:\Freescale\CW MCU v10.6\eclipse\..\MCU\bin\de.exe" -noni -language en -ORBendPoint giop:tcp:127.0.0.1: -ORBtraceLevel 0
INF: CMD>RE
INF: Initializing.
INF: Target has been RESET and is active.
INF: CMD>CM C:\Freescale\CW MCU v10.6\MCU\bin\Plugins\support\hc08\gdi\P&E\9s08qe8.s8p
INF: Initializing.
INF: (Recommended TRIM=$00A6,FTRIM=0)
INF: Device is secured. Erasing ...
INF: Done.
INF: (Bus Freq = 9306KHz)
INF: Initialized.
INF: ;version 1.04, 7/13/2009, Copyright P&E Microcomputer Systems, www.pemicro.com [9s08qe8]
INF: ;device Freescale, 9S08QE8, All
INF: ;begin_cs
INF: Loading programming algorithm ...
INF: Error loading .S8P file : C:\Freescale\CW MCU v10.6\MCU\bin\Plugins\support\hc08\gdi\P&E\9s08qe8.s8p at address 0000006A
ERR: Error loading programming algorithm - load aborted.
ERR: Error occured during Flash programming.
INF: Frequency change to ~8732876hz.
INF: Frequency change to ~0hz.
INF: Frequency change to ~0hz.
INF: Frequency change to ~9634760hz.
INF: Frequency change to ~4699017hz.
INF: Device is Secure.
INF: Device is secured. Erasing ...
INF: Done.
The final error that I saw stated that the programming basically couldn't program the flash with the S19 file. I'm suspecting that somehow the flash mass erase bit set/reset and basically broke the chip. Although above it does say that it erased the chip!?
Thanks,
Ian
Hi Ian,
can you please create a Fresh new bare board project and don't use "Flash Programming" use Ctrl+F11 for programming the Target device or F11 for debugging n check does it work or not? it won't take more time.
Thanks and Kind Regards,
Robin
Hi Robin,
I created a bare board project and used Ctrl+F11 for programming. I immediately saw the following:
On clicking Abort I saw the following:
Moving on............................
In a previous post I mentioned that I would try my USBDM with the QE8. To do this I removed the QE8 daughter card from the DEMOQE board and connected the relevant pins between the daughter card and USBDM. I created a new bare board project, hit F11 and to my surprise the debugger launched and programmed the QE8 without problem!!! :-) I then re-programmed it with the code that I was originally using without problem.
I presume the only conclusion left is that somehow the DEMOQE baseboard has failed or at least the P&E connectivity???
Thanks,
Ian
Hi Ian,
From Cntl+F11 it seems connectivity problem as you said , instant of aborting you can try Refresh n Retry and if you get the same message than cancel and do Power on Reset to the Target and give one more try.
and still if it doesn't work than it's a connectivity problem.
Thanks and Kind Regards,
Robin
Hi Robin,
Funnily over the weekend I did try also the Refresh n Retry route and were pretty much getting the same issues.
So to sum up it looks like the P&E connection on the DEMOQE8 board has died (but I don't have another QE8 daughter card to test it with) and that the QE8 chip is fine and its flash is not secured in any way. The "Device is secure. Erase to unsecure?" error was clearly misleading and actually indicates a connection issue which I'm unable to resolve.
Can I express a big thank you to Robin S for his help with this issue, much appreciated.
Thanks,
Ian
Hi Ian,
No problem , you are welcome and Happy Programming.
Thanks and Kind Regards,
Robin
Hi Ian,
Just for information , when you are flashing Target using FLASH Program , please check in Run Config or Debug config, does it select the Flash Target file or sometimes it also select the debugger file , it happened offen with me.
Alternative solution will be you can try using Debugger Flash [Control + F11] instant of Flash Programming target and see does it work or not?
Thanks n Kind Regards,
Robin
Hi Robin,
When I start a debug session I use F11 but I will try Control+F11 when I get home tonight and let you know if it made any difference.
Here are my run and debug configurations. I believe that target file is correct.
Thanks,
Ian
Hi Ian,
you are right with F11 for debugging , with Ctrl+F11 i wanted to say programming using debugger programmer instant of Flash programming.
Thanks n Kind Regards,
Robin
Hello Ian,
The error 14 refers to the P&E Microsystems site. P&E Micro provides support for the programming interface for CodeWarrior. Going to their web site, error 14 means that the programmer can't find the algorithm file. This file contains information on how to program the flash part.
Here is path for algorithm file : C:\Program Files (x86)\Code Worrior\CW for MCU 10.5\CW MCU v10.5\MCU\bin\plugins\support\HC08\gdi\P&E
in this folder you will get .s8p file with respect to your controller .
The rest you find in the following discussion , it will help you
https://community.freescale.com/thread/60834
Note: In case the answer helps, kindly mark it as correct or helpful.
Thanks and Kind Regards,
Robin