Tool/software: Code Composer Studio
Hi all,
We have developed a sensor conditioning circuit for a client using the MSP432P401M processor. The code inside is very simple, the MCU ADC samples the signal at 200 Hz and then we perform piecewise linearization before sending the value out over UART. I have divided the full range of the sensor into eight parts with switch-case statements over which we will do the piecewise linearization. We are using a calibrated and high resolution master sensor to calibrate these. Currently what we do is we mount the two sensors side by side and in the switch cases modify the coefficients. Each sensor is a little bit different and so I have to take the readings for each one and then make the change in the main code, build it and flash it.
I was thinking, if I write the switch case statements using variables and in a different file assign the values to the variables depending upon the calibration test, then is there a way the whole process can be automated? What I can envision is this; we can easily automate the part where the system will take the master and test sensors through the same conditions and record the outputs in some standard format like Excel or CSV. Now is there a way where I can automate the part where CCS will take the values from this table, put it in right place, compile and flash?