I am attempting to get the ADC12 and ADC16 to trigger from the PWMA output of SM0, SM1, and SM2 modules. I have set the XBARA_SEL0, 1, 2 registers to map the pwm module's PWMA output to the ADC input, and similarly for the PWMB and and the ADC16.
XBARA_SEL0 = 0x140C;
XBARA_SEL1 = 0x160D;
XBARA_SEL2 = 0x180E;
When I run the code, the PWMA_SMxTCTRL register reads 0x0004 instead of 0x8004 (which is supposed to be setting the trigger for PWMA as a trigger). The code does attempt to set the bit in PWMA_Init() in the PWMA.c module generated by ProcessorExpert (and similarly for SM1 and SM2),
/* PWMA_SM0TCTRL: PWAOT0=1,PWBOT1=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,OUT_TRIG_EN=4 */
setReg16(PWMA_SM0TCTRL, 0x8004U);
but it doesn't get set when I look at it using CodeWarrior. Any idea what is wrong? Is this even possible with this chip?