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.

SM320F2808-EP: Bare minimum ADC register configuration

Part Number: SM320F2808-EP

I'm working on project using emulation through the JTAG debugger to read the ADC values from A0-A7 and B0-B7.  I'd like to know the bare minimum ADC register settings to get this up and running.  Keep in mind none of the other peripherials are enabled, but if I need to enable something I can probably get that going too (although I would prefer not to).

ADC speed isn't a concern at all.

Right now I don't have an external clock input, but if needed I can get that active.

Thanks in advance

  • Brandon,

    You can find some basic ADC examples in the Header Files / Example (SPRC191) package.

    This should have been visible from the device product page, but it was removed recently -- I assume by accident. We are looking into it.

    -Tommy

  • Due to admin locks I am not able to install the files you sent.

  • Right now this is what I have (which doesn't appear to be working)

    ADCTRL1 = 0x0F50

    PCLKCR0 = 0x0008

    ADCTRL2 = 0x2020

    ADCTRL3 = 0x00E1

    ADCMAXCONV = 0x0033

    ADCCHSELSEQ1 = 0x3210

    ADCCHSELSEQ3 = 0x7654

    I'm assuming that should be enough to make the ADC continually loop and make conversions...

  • Brandon,

    Our typical support model is to use published examples to demonstrate baseline functionality.

    Can you try the examples from this ADC Calibration appnote? They are zipped without an installer.

    -Tommy

  • Brandon,

    It has been a while since your last update.  I assume that you were able to resolve your issue.

    If not, please reply to this thread.  If the thread has locked due to timeout, please create a new thread describing the current status of your issue.

    -Tommy

  • Issue still not resolved, but I'm frustrated with the support so I quit responding.

  • Brandon,

    I'm sorry that you are frustrated.  We find examples to be the most efficient way of getting started.

    -Tommy

  • You mean examples are the easiest for you, since you don't actually have to answer the initial question I asked...

    I can't use an example because I am not programming this part with C code.  I'm running a hybrid of boundary scan that allows me to read and write internal registers of the device.

  • Brandon,

    For your particular goal of bare bones register-level manipulation to initialize the device and kick-start the ADC, we have no validated knowledge base available.

    There are nuances to the initialization sequence for both the ADC and device system that are captured in our published examples.  This is why we refer to them for support.

    From my initial review of what you have, I noticed:

    1. Write access to ADCTRL1 is likely locked out until the module clock is enabled
    2. The ADC fields are configured out of order with respect to best practices -- the conversions should not be triggered before the module configuration is complete
    3. There is a watchdog which may reset the device until it is disabled

    However, I do not have a list compiled of all potential pitfalls that may afflict this particular approach to programming the device.

    If you still have issues after addressing the above, my recommendation for the quickest path to success would be to modify an existing example to implement the desired device behavior with the least amount of instructions and then extract the register activity from the validated example.

    -Tommy