Hi Guys,
Why is there no log of the address that the TRIM values are being programmed to, see below log:
----------------------------------------------------------------------------------------
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\9s08pa4.s8p
INF: Initializing.
INF: (Recommended TRIM=$0086,FTRIM=1)
INF: (Bus Freq = 16776KHz)
INF: Initialized.
INF: ;version 1.02, 01/24/2014, Copyright P&E Microcomputer Systems, www.pemicro.com [9s08pa4]
INF: ;device freescale, 9s08pa4, All
INF: ;begin_cs
INF: Loading programming algorithm ...
INF: Done.(FCDIV=$90)
INF: CMD>EM
INF: Erasing.
INF: Module has been erased.
INF: CMD>PM
INF: Programming.
INF: Processing Object File Data ...
INF: .
INF: Programmed.
INF: CMD>VC
INF: Verifying object file Checksum16+CRC8 to device ranges ...
INF: block 0000F000-0000F8B5 ...
INF: Ok.
INF: block 0000FA00-0000FA85 ...
INF: Ok.
INF: block 0000FFB4-0000FFB5 ...
INF: Ok.
INF: block 0000FFCE-0000FFCF ...
INF: Ok.
INF: block 0000FFE2-0000FFE3 ...
INF: Ok.
INF: block 0000FFFE-0000FFFF ...
INF: Ok.
INF: Checksum Verification Successful. (Cumulative Checksum16+CRC8=$F757CA)
INF: CMD>PT
INF: Programming Trim value $86 to location $
INF: Success.
INF: Programming FTrim value $01 to location $
INF: Success.
INF: CMD>RE
INF: Initializing.
INF: Target has been RESET and is active.
Executing download task: C:\Users\carln\workspace\HCT4ULPA_04/Project_Settings/Debugger/MC9S08PA4.tcl
----------------------------------------------------------------------------------------
This is what I normally do with all my other S08 projects:
volatile byte __far NV_ICSTRM_FAR @0x0000FFAF;
volatile byte __far NV_FTRIM_FTRIM_FAR @0x0000FFAE;
...
if((NV_ICSTRM_FAR == 0xFF) || (NV_ICSTRM_FAR == 0x00)) while(1); //WAIT HERE ON ERROR, PRODUCT WILL APPEAR "BRICKED"
...
Ok so I just realised for some reason which I cannot understand they have moved the TRIM values to these locations (just by checking the memory table int he debugger and searching for the values 0x86 and 0x01 and found them here:
volatile byte __far NV_ICSTRM_FAR @0x0000FF6F;
volatile byte __far NV_FTRIM_FTRIM_FAR @0x0000FF6E;
I have also just realised that the chip now magically loads these factory values on boot.
Questions:
- Why move them from the last used space which is where they are on everything else?
- Where is this documented as I spent an hour on this on my day off. I searched the reference manaul for FF6F and FF6E and find nothing, i searched the headers and find nothing, i searched all the programmer options and settings and found nothing allowing you to change the address
- Can I manually change this address to where I want to it to be?
- The "Factory programmed" values are now loaded automatically on boot by some internal processor magic. I checked these values against the programmed trim values and they are significantly different, the factory value is 0x0801 and the above is 0x0861. They are they so far off each other?
已解决! 转到解答。
I am now because the default is different to what it use to be.
I have this project complete and working in production now.
In summary
- TRIM values are now "automatically loaded" during reset based on factory values you have no access to, these values are far different from what the after market tools program (I didnt look in to this because I dont really care, I needed my own values for my application)
- TRIM values that are programmed manually by your tool can still be used, however, the default location and value has changed from previous versions
Hi Carl
Yes the documentation for the TRIM value on the S08P family is not so clear as on the other S08 device, on the reference manual there is only a note
.
"NOTE Some tools like ProcessorExpert or USB Multilink may use flash memory location, such as 0xFF6F and/or 0xFF6E, to store the temporary trim value."
regarding to if you can move the address i believe that this is not possible.
Regarding to your last question I got confuse, can you please explain it?
thanks
regards
Vicente Gomez
Thank you for the reply.
I must have a slightly older reference manual as that note is not in there. I will go and download the latest version.
As for my questions: "The "Factory programmed" values are now loaded automatically on boot by some internal processor magic. I checked these values against the programmed trim values and they are significantly different, the factory value is 0x0801 and the above is 0x0861. They are they so far off each other?"
I guess what I am saying is if i boot the processor and inspect the timming values, I see 0x80(TRIM) and 0x01 (FTRIM) loaded automatically by the processor. When I use the programmed values at 0xFFAE/F I get 0x86 (TRIM) and 0x01 (FRTIM). Why is the internally set TRIM so far difference from the programmed TRIM?
I am now because the default is different to what it use to be.
I have this project complete and working in production now.
In summary
- TRIM values are now "automatically loaded" during reset based on factory values you have no access to, these values are far different from what the after market tools program (I didnt look in to this because I dont really care, I needed my own values for my application)
- TRIM values that are programmed manually by your tool can still be used, however, the default location and value has changed from previous versions