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.

MSP430F5359: How do "Comparator B" "Port Disable" bits interact with the ADC12 and DAC12_A peripherals?

Part Number: MSP430F5359

In the MSP430x5xx and MSP430x6xx Family User's Guide (Literature Number: SLAU208P, June 2008–Revised October 2016), Section 32.2.7 Comp_B Port Disable Register CBCTL3 describes how analog signals applied to the CMOS GPIO inputs that share the Comparator B analog inputs can cause cross-conduction at the digital input stage when the analog voltage is near the CMOS gate's threshold voltage. The section goes on to describe how one should set the "Port Disable" bits for those inputs that have analog signals applied to them rather then being used as GPIOs.

That's great for Comparator B and I understand that. But on the MSP430F5359, those same pins are also pin-multiplexed to the ADC12 peripheral and, for P6.6, P6.7, P7.6, and P7.7, potentially to the DAC12_A peripheral as well and these peripherals DO NOT have "Port Disable" bits.

So, if one is using P6.0 through P6.7 or P7.4 through P7.7 signal pins as analog inputs to the ADC12 peripheral or if one is using P6.6, P6.7, P7.6, or P7.7 as the DAC12_A outputs, should one be setting the respective Comparator B "Port Disable" bits so the GPIO receivers are disabled? And if that's true, that should probably be documented somewhere, for example, in the ADC12 and DAC12_A sections.

  • Hi Atlant,

    I think what you are looking for is the port diagram for the according pins P6.0 through P6.7 or P7.4 through P7.7 (you'll find those in the device datasheet). Those should give the additional information here as the implementation of the port is shown.

    Let me take the port diagram for pins P7.4 thorugh P7.7 as an example:

    When you choose the ADC12 or DAC12_A functionality respectively the Comparator_B won't interfere in any way. The CBPD.x bit setting would only influence in case Comparator_B functionality is chosen.

    Does this answer your question to the desired extent?

    Best regards,

    Britta

  • Britta:

    Thanks for your reply and for the diagram (I tend to forget how detailed those Datasheet port diagrams are!), but it actually supports my point of view! ;-)

    If you look at the Schmitt Trigger transmission gate (in the lower right part of the diagram) that receives the GPIO input data, its "Disable" ("Enable L") input comes from an "OR" gate in the center-left of the diagram. And one of the inputs to that OR gate is the CBPD.x bit. That implies that indeed, CBPD.x can ALWAYS disable that GPIO input transmission gate no matter whether or not the Comparator B peripheral is active/selected/whatever.

    I guess I'll try this out with some code; it should be an easy enough effect to see. ;-)

  • Hi Atlant,

    I'm sorry to cause more uncertainties. Unfortunately exactly the port diagram I've posted before needs to be updated as there are major errors in displaying the port functionalities. It took me a while to go through it and identify the issue, sorry for that. The diagrams for port 6 actually look better.
    To answer your question please rely on the different tables depicting the port diagram, also table 6-64, it seems the error only made its way into the schematic. I'm sorry the confusion has been caused.
    In the table you'll see that the status of the CBPD.x bit doesn't influence the ADC12 or DAC12.

    Please let me know in case you have more concerns and be sure that I'm starting the process to fix the port diagram in the datasheet.
    Good catch on your side!

    Best regards,
    Britta
  • Britta:

    Thanks for your reply! Yes, the P6.0-P.7 diagrams look a lot more sensible with P6SEL.x routed to an input to the OR gate rather than "fighting" with the output of the OR gate as is shown in the P7.4-P7.7 diagrams. I'll update our code as necessary to drive CBPD.x here necessary and document why we're not driving for the other P6.x and P7.x pins.

    I'll also mark this issue as "Resolved" and I'll look forward to an update Datasheet one of these days.

    Atlant

**Attention** This is a public forum