AnsweredAssumed Answered

Temperature Logging using internal ADC/TempSensor

Question asked by SAIPRIYA SUBRAMANIAN on Aug 29, 2017
Latest reply on Sep 12, 2017 by SAIPRIYA SUBRAMANIAN

I am using a S9KEAZ16 controller and would like to use one of the ADC channels as a temp sensor to monitor the CPU temp. The ADC is hardware triggered using a FlexTimer module. I am able to read the measured temperature values on FreeMaster although, I am not able to log it in a data logger.

I am using the EEPROM driver from the blog Driver for Microchip 24xx Serial EEPROM | MCU on Eclipse  and I would like to log the temp sensor reading as and when I receive them. Is it advisable to write the temp sensor values inside the ADC ISR itself? I am worried about the ADC ISR consuming more time to execute and as a result of which a few triggers missed or vice versa incorrect data written on the EEPROM because of lag.

Also is there a way to write float values on my EEPROM?

I tried writing the temp sensor value inside the ADC ISR and the loop gets hung up in the writeblock routine.




Is there a way to debug this issue??