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.
Part Number: MSP432P401R
Tool/software: Code Composer Studio
Now, that the code example works (msp432-401x_comp_05_MSP_EXP432P401R_nortos_qcc), I am stuck with another problem. If I try to use another pin than P8.0, I can't get the code to work.
Details:
If I try to use P7.7, which is, accordingly to slas826g.pdf (page 168), C0.2 (instead of P8.0 which is C0.1), as (acceptable) analog input for the voltage which will be compared through COMP_E,
I changed
COMP_E0->CTL0 = COMP_E_CTL0_IPEN | // Enable V+, input channel CE1
COMP_E_CTL0_IPSEL_1;
to
COMP_E0->CTL0 = COMP_E_CTL0_IPEN | // Enable V+, input channel CE1
COMP_E_CTL0_IPSEL_2;
And I also changed
COMP_E0->CTL3 = BIT1;
to
COMP_E0->CTL3 = BIT2;
And while it compiled perfectly, I cannot turn the red led off even when P7.1 is grounded (with other things as described in your previous posts and which works using P8.0)
I even added
P7->SELC |= BIT7;
to be sure to put P7.7 into the right selection, just in case, even if note (4) of slas826g (page 168) seems to imply that this is not required, in this case.
Do you have a working example for another pin than P8.0 ?
Thanks for your attention, as usual, it is appreciated.
Typo: I meant "even when P7.7 is grounded", not "even when P7.1 is grounded"
Hi Michel,
Michel Walsh said:Do you have a working example for another pin than P8.0 ?
I confirmed that your code changes worked on my MSP-EXP432P401R LaunchPad. I connected a jumper wire from P7.1 to the LED1 header pin closest to the bottom of the LaunchPad and connected another jumper wire from P7.7 to 3V3 or GND. When P7.7 was connected to 3V3, LED1 turned on and stayed on until I switched P7.7 from 3V3 to GND.
You may want to check your connections.
Regards,
James
**Attention** This is a public forum