[quote userid="47378" url="~/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1304281/msp430g2202-different-ifg2-behaviour-depending-on-package/4961452#4961452"]The 55mA LED caught my eye. Your schematic shows it being powered by a battery (via TPS61221), but you mentioned a Launchpad. Is that how you're powering it?[/quote] No, it's battery powered. The connection to the launchpad consists of GND + SBW. [quote userid="215629" url="~/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1304281/msp430g2202-different-ifg2-behaviour-depending-on-package/4962448#4962448"]This seems unlikely given Figure 15 (load transient response) in the TPS61221 data sheet.[/quote] Yes. The supply should be ok. But I haven't measured it with the oscilloscope yet. [quote userid="47378" url="~/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1304281/msp430g2202-different-ifg2-behaviour-depending-on-package/4963332#4963332"] > switch (P2IFG) { Switching P2OUT.6 (to turn on/off the LED) will set P2IFG.6, so this switch() won't do what you expect. Try instead: > switch (P2IFG & GPIO_IR_DETECT_PIN) { [/quote] The complex trivialities. More than one flags can be set at a time. Thank you, I fixed it. As I only set the PIR GPIO pin P2.7 in the P2IE, P2.6 shouldn't be able to trigger an interrupt. Correct? After your code review I would exclude the FW as a cause for now. I will check the supply and the sensor circuitry to see what waveforms are actually present using an oscilloscope, as soon as I get back to work.
↧