Part Number: MSP432P401V
Good evening,
I have a weird issue when routing a PWM signal from the timer module to the respective output pin. I am using the MSP432p401v in RCG package, which means that TA2.3 can be configured at pin 6.6 (see datasheet SLASEA0B, page 178).
If I do so, the current draw is unusually high (around 15 mA) and the PWM amplitude measured at P6.6 is only 1.8V p-p (Vcc is 3.3V). I suspected a short to GND at first, but >1M is measured here. Changing the code to TA2.1 on P5.6 yields the expected results, 3.3V p-p PWM signal on pin 5.6 and low microamps current draw.
Any ideas?
#include "msp.h" #include "driverlib.h" /* Standard Includes */ #include <stdint.h> #include <stdbool.h> /* Timer_A PWM Configuration Parameter */ Timer_A_PWMConfig pwmConfig = { TIMER_A_CLOCKSOURCE_ACLK, TIMER_A_CLOCKSOURCE_DIVIDER_1, 33, TIMER_A_CAPTURECOMPARE_REGISTER_3, TIMER_A_OUTPUTMODE_RESET_SET, 16 }; int main(void) { /* Halting the watchdog */ MAP_WDT_A_holdTimer(); MAP_PSS_disableHighSide(); MAP_PCM_enableRudeMode(); MAP_GPIO_setAsOutputPin(GPIO_PORT_PA, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PB, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PC, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PD, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PE, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PJ, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PA, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PB, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PC, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PD, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PE, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PJ, PIN_ALL16); /* Starting LFXT and sourcing ACLK and BCLK from it */ MAP_CS_setExternalClockSourceFrequency(32000,32000); MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_PJ, GPIO_PIN0 | GPIO_PIN1, GPIO_PRIMARY_MODULE_FUNCTION); MAP_CS_startLFXT(CS_LFXT_DRIVE3); MAP_CS_initClockSignal(CS_ACLK, CS_LFXTCLK_SELECT, CS_CLOCK_DIVIDER_1); /* Configure P6.6 to TA2.3 */ MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P6, GPIO_PIN6, GPIO_PRIMARY_MODULE_FUNCTION); MAP_Timer_A_generatePWM(TIMER_A2_BASE, &pwmConfig); while (1) { MAP_PCM_gotoLPM3(); } }