"The trim value could not be measured properly"

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

"The trim value could not be measured properly"

1,046 Views
Nick60
Contributor I
Hello I am trying to evaluate a MC9S08PL8 microcontroller on a small pcb using the internal oscillator. I have imported the MC9S08PL8 NXP project and made one from scratch but always get the "The trim value could not be measured properly" message. I have read previous postings and have unchecked the "Calculate trim and program the non-volatile Trim Register" checkbox. Thank you Nick
0 Kudos
3 Replies

1,034 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Have you copy the Trim value from the non volatile memory to the TRIM register in your code?

 

/* System clock initialization */
/*lint -save -e923 Disable MISRA rule (11.3) checking. */
if (*(uint8_t*)0xFF6F != 0xFF) { /* Test if the device trim value is stored on the specified address */
ICS_C3 = *(uint8_t*)0xFF6F; /* Initialize ICS_C3 register from a non volatile memory */
ICS_C4 = (uint8_t)((*(uint8_t*)0xFF6E) & (uint8_t)0x01); /* Initialize ICS_C4 register from a non volatile memory */
}
/*lint -restore Enable MISRA rule (11.3) checking. */
/* ICS_C1: CLKS=0,RDIV=0,IREFS=1,IRCLKEN=1,IREFSTEN=0 */
ICS_C1= 0x06; /* Initialization of the ICS control register 1 */
/* ICS_C2: BDIV=1,LP=0,??=0,??=0,??=0,??=0 */
ICS_C2 = 0x20; /* Initialization of the ICS control register 2 */
/* ICS_C4: LOLIE=0,CME=0 */
ICS_C4 =A0;

 

I hope this will help you

 

0 Kudos

1,029 Views
Nick60
Contributor I

Hi

I may not have explained clearly,

The problem I am having "The trim value could not be measured properly" is when I try and start a debug session, the device is not yet programmed and therefore is not running any code.

I made another board up with a MC9S08SH16 rather than the original MC9S08PL8. The MC9S08SH16 programs fine and shows the processor expert dialog when I start a new project.

Making a new project with the MC9S08PL8 does not give the option to setup the device with processor expert. If I convert a project to use processor expert it does not show I2C availability which is incorrect.

I wonder if the problem is that MC9S08PL8 devices are not setup correctly in CodeWarrior.

Thanks again

Nick

0 Kudos

1,024 Views
vicentegomez
NXP TechSupport
NXP TechSupport

The last CodeWarrior support the PL family, but there is not Processor expert for that family

 

You need to use only C code

Regards

Vicente Gomez

 

0 Kudos