This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC 1768: ADC Trim Register Error with VTOR > 0

Hello,

I'm using a NXP LPC1768 Cortex-M3 controller with KEIL MDK-ARM and uLink2-Debugger.

When I start my application from a higher address than 0 (VTOR > 0) the ADC gives back strange values. This is due to the ADC Trim register ADTRM.

During debugging:
When I start my application from address 0x00 (VTOR=0x00), the ADTRM register is 0xF00.
But when I start it from address 0x2000 (VTOR=0x2000), the ADTRM register is set to 0x000. The other application works. I can set ADTRM manually to 0xF00 (although it is not allowed by datasheet), then it works.

Can you explain me that behavior? When is ADTRM set during boot code?
What can I do, to prevent this ADC malfunction?

Thank you for an answer,

DW.