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.

P2.7 use on the TRF7970A EVM

Other Parts Discussed in Thread: MSP430F2370

I want to use P2.7/XOUT/CA7 as a simple GPIO on the TRF EVM but have not been able to do so without breaking host communications.  

Per table 22 in the MSP430F2370 datasheet, (Port P2 (P2.7) Pin Functions) if I clear bit 7 of P2SEL the EVM will stop talking to the host PC via UART/USB.  If I leave P2SEL.7 set then I cannot drive P2.7 high.  

EX:

P2DIR |= BIT7;//output
P2SEL &= ~BIT7;//if active, kills host comm. If commented out, disables P2.7 (won't go high)
CAPD &= ~BIT7;
P2OUT |= BIT7; //high

Any ideas?

  • Hi Don,

    I found something in the users guide that may explain this behaviour.  On page 27 of the MSP430x2xx Family Users Guide, there is a note that states:

    "P2.6 and P2.7 functions have been added to 20- and 28- pin devices. These are shared functions with XIN and XOUT. Software must not clear the P2SELx bits for these pins if crystal operation is required."

    In the case of the EVM, we are feeding the clock into the XIN pin of the MSP430 from the SYS_CLK output of the TRF79xx.  Would it be okay to use a different open GPIO?  For example, two pins down, we have P1.1 available. 

  • Hi Eddie,

    Thanks for the reply.  Much appreciated.

    I already have a large production run of modules built and waiting on this firmware.  One of the external module pins is connected to P2.7.  I need to make GPIO P2.7 work as a GPIO.  

    Are you saying this is not possible?  My MSP430F23x0 datasheet references P2.7 as GPIO in several places, and page 52 talks specifically about enabling P2.7 and doesn't indicate there would be any issues with using P2.7 as generic I/O.

    Don

  • Don,

    If you are feeding sys_clk into the MSP430F2370 XIN pin and using this as a clock source, it looks like you cannot also use P2.7 as GPIO.  Page 51 of the datasheet shows how they are connected internally.  If you are not using these pins as a clock signal, P2.6 and P2.7 can be used as GPIO.  If you absolutely need to use P2.7 as GPIO, the only way I can think of would be to change your code to use the internal DCO of the MSP430 and dsiable the external clock source.  You should disable sys_clk in the TRF79xx and also disable the LFXT1 in the MSP430.  The LFXT1 oscillator details can be found in section 5.2.3 of the family users guide.  

  • Well, that is unfortunate, but OK.  I will designate that IO pin on the module as NC in the datasheet.

    As always, thanks for the reply. 

    Don