Other Parts Discussed in Thread: MSP430F5325
Hi, Our hardware uses TI-Controller MSP430F5325, and it accumulates energy in RAM and stores it after every 0.1 kWhr count in EEPROM. Incase power fail occurs between two write cycles of EEPROM, we will loose the count by max 0.1KWHr. In order to prevent this, we have developed power fail circuit in the hardware using SP706 IC which will issue early power fail warning to micon. This warning will be a falling edge output and we need to connect it to Nonmaskable edge sensitive Interrupt having highest priority ( next to reset). An ISR will be called which will have to do the job of saving the accumulated ENERGY count in RAM to EEPROM before the power supply falls to such a low level that the complete systems stops functioning.
In addition to this, the Circuit of IC SP706 gives additional facility. It issues /RST signal to rest the micon incase there are dips on the power supply or watch dog time out is exceed due to micon getting hanged due to EMI.
In case of MSp430F5325, the NMI is shared with /RST on the same pin. Therefore, if we configure the pin to NMI, we will be able to achieve the above objective of saving energy count but will the controller get reset from an external reset signal coming from Supervisiory circuit (SP 706) in case power supply sees EMI/EMC noise or dips on power supply??
Pl refer below circuit diagram for Supervisory circuit/attachment which has 2 functions:
1) Power fail detection output PFO: Interrupt to NMI1581.POWER FAIL QUERY.docx
2) Reset output from
a) Power supply falling below threshold value
b) After Watch dog time out is expired.
Explanation of CKT : We have used sp706 of threshold 2.63v for supervisory & power fail purpose.
Generally high priority external interrupt pin is used for power fail feature. When power fail condition occurs external interrupt is initiated by PFO output and the content of energy accumulation variable in RAM is stored in E2PROM in the ISR of NMI. This is the way we save the energy count and read it on the next power ON and add it to the energy count so that there is no loss of energy accuracy.
But for implementing this in MSP 430F5325, we are facing problem because /RST and NMI are shared on one pin.
Even though we can configure the Pin as NMI after power on reset is done and the program starts running (/RST is required for POWER ON), we will not able to use the external RST generated by SP706 when there are dips on the power supply or watch dog timeout is exceeded in case micon hangs due to some EMI noise.
Is there any facility in MSP430F5325 to store energy accumulated count in EEPROM automatically when above situation occurs,if yes how??pl clarify.