Hi,
I'm reading DN403 / SWRA415b - CC112X/CC120X On-Chip Temperature Sensor in order to do a digital read-out of the temperature on a CC1200 device.
But I'm having some difficulties:
1)
The app note is done on a CC1120 device, and states that I should set 'FREQ_IF_CFG' to zero. On CC1200 the register is not called this, but I assume that its IF_MIX_CFG on this device. Correct?
(please add a footnote to the app not on next update)
2)
The app-note states that I can read the digital temperature value in the CHFILT register. I assumed that it must be the CHFILT_I2 / CHFILT_I1/ CHFILT_I0/ CHFILT_Q2/ CHFILT_Q1/ CHFILT_Q0 registers, and a look at the source-code confirmed this.
But I'm not sure how to use these I and Q values. Is it D= sqrt(i^2 + q^2). A look at the source-code did not help, since it calls a global function updateGUI(), which is not included.
(please state how to convert I and Q values to the 'D' value in the next update of the app note.... and/or include the function that does all the calculations in the source code.)
3)
The values don't seem to be correct. I'm getting:
(using names from the demo code)
@ ~ 60-70 deg C
ADCValue_I / ADCValue_Q : 185 / -2 decimal ( 0xb9 / 0x1fffe Hex)
@ ~ 22 deg C
ADCValue_I / ADCValue_Q : 46 / -30 decimal ( 0x2e / 0x1ffe2 Hex)
So _something_ is really working, but there is something wrong with the range.
Changing the temperature 40 degrees should change the digitally read value by ~40.000.
I'm getting marcState 0x6D before entering debug-mode and 0x5F after (again refering to the demo source code).
Is it a problem that there is something connected to the GPIO's?
Intention is just to route the voltage from the temperature circuit to the ADC. But if it is 'leaked' to a pin, which I pull high/low externally, it could be a problem, or?
Any suggestions highly appreciated?
/T