This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Support,
I am having difficulty setting P2.6 to output. Specifically the TA0.1, timer output. On the G2 LP, p2.6 is not pinned out. But XIN/XOUT is not being used so i tacked a wire directly to the pin on the device. I am trying to get PWM output. Note: It does work 100% when i use P1.6 or P1.2, per the data sheet.
WORKING: P1DIR = 0x40, P1SEL = 0x40.
NOT WORKING P2DIR = 0x40, P2SEL = 0x40
Any thoughts?
Thanks.
Hello,
Thanks for your detailed post. When configuring P2.6 to output TA0.1, you'll need to modify five control bits: P2DIR.6, P2SEL.6 and P2SEL.7, P2SEL2.6 and P2SEL2.7. Please see Table 21 from the datasheet below. For most pins, only the PxDIR.y, PxSEL.y, and PxSEL2.y bits need to be configured, but these XIN/XOUT pins are unique.
Regards,
James
MSP Customer Applications
The chip boots up with P2SEL = 0xC0. It appears from the table above that for timer output you need it to be 0x40. But your OR instruction doesn't clear the high bit. You also aren't changing P2SEL2, but it boots cleared, so you're probably ok there. (but still, best practice would be to clear it).
**Attention** This is a public forum