Author Topic: Reading flash (NVM) memory on Freescale S12G microcontroller  (Read 600 times)

0 Members and 1 Guest are viewing this topic.

Offline aiq25

  • Regular Contributor
  • *
  • Posts: 84
  • Country: us
Hi. I'm using a Freescale S12G family micro. I'm trying to get the ADC reference voltage to work. I'm looking to read the internal voltage reference of the micro (already have this working) and comparing it with the stored value to get the actual VRH (in my case VCC) of the ADC. This is to compensate any variations in the VRH (in my case VCC).

I'm looking at the datasheet and it says the following:
VRH = (StoredReference/ConverteredReference)*5V

I have the ConvertedReference done but I can't read the stored reference. The datasheet says it's in NVM memory IFR location 0x0_4022/0x0_4023. Can anyone give me some pointers on how to read that memory location? I'm still a beginner at programming, that's why I'm a little confused. I'm using CodeWarrior IDE.

Thank You.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf