Hello,
MSP430F4250 microcontroller has a DAC inbuilt into it with offset calibration feature. According to the datasheet, the calibration takes max 32ms when AMP setting = 5. I observed that it takes approximately 11ms in my case. Also, the output voltage during calibration is almost zero.
1) Internal to the controller, how is DAC offset calibration implemented? Curious to know the technique behind it.
2) Will the time taken for calibration vary wildly for a microcontroller with the same firmware? Say, 3ms in one instance and 11 ms in another?
(During development of the firmware, I noticed that the controller used to reset frequently. Identified the cause to be the Watchdog Timer- I had kept the WDT running with 4ms overflow period but had not implemented steps to reset it while DAC calibration was underway (~11ms).
HOWEVER, the reset phenomenon was not consistent- the uC used to work properly half the time. How can this be? The way I see it, this can be only if DAC calibration took less than 4ms during those instances when the uC used to work properly. )
This is how I implemented DAC calibration- Set the DAC12CALON bit to initiate calib. Poll the bit until it becomes zero which signifies that calib is complete.
DAC12_0CTL |= 0x0200; // Initiate DAC calibration while( (DAC12_0CTL & 0x0200) ){ }