Is it possible that the signal looks not good even though I used a PWM?

Hello, I am trying to make a sinusoidal by using the PWM module with an interrupt handler.

The thing is, the signal looked perfect from the development kit.
However, when I write the code to the IC and run it from the board level (with coin cell battery power), there is a tic with the same interval.

Is there someone who has a clue about this?

Signal images

Enlarged view

  • Are you by any chance running a BLE stack and advertising every 100ms, or in a connection with a connection interval of 100ms? 

    I ask because any large current consumption will reduce the output voltage of a CR2032 coin cell significantly, especially if the coin cell has <~40% of its charge capacity left. The internal resistance of a CR2032 increases proportionally with its load, and CR2032's are spec'ed for sub-mA continuous loads. 

    The general recommondation is to use a very low leakage supercap with a CR2032 in order to increase the amount of usable charge and filter out transients like the ones on your scope. Using DCDC regulators will also likely reduce the transients on your GPIO as the transient loads of the CPU and RADIO are reduced. 

    You might get away with a 47-100uF cap, just make sure it has very low leakge, or else it'll drain the battery. 

    I also strongly recommend that you measure the current consumption according to Measuring current, and the supplied voltage from the CR2032. 

    See this old appnote: High pulse drain impact on CR2032 coin cell battery capacity.pdf

Related