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.

MSP432P401R: Picking Daises at 48 MHz with an MSP432....

Part Number: MSP432P401R

Hi All,

I have been trying to figure out why my ADC14 application is so flaky.  Sometimes it seems to work and sometimes not.  I would really like to go at full speed if possible to make measurements from several different analog inputs at as near to the same time as possible with the ADC14.  Because of this I was trying to set the clock so it would go at that frequency.  I have narrowed my problem down to the following code.  When I change the CS_DCO_FREQUENCY_48 to CS_DCO_FREQUENCY_24 it works wonderfully, but when I don't, single stepping along, it goes picking daises as soon as the MCLK is set at 48 MHz, and ends up at:

No source available for "0x9b28"

 * This was modified by Rob Frohne
 ******************************************************************************/
#include <ti/devices/msp432p4xx/driverlib/driverlib.h>

int main(void)
{
    // Halting WDT
    WDT_A_holdTimer();

    // Set to Vcore1
    PCM_setCoreVoltageLevel(PCM_VCORE1);

    // Set to use DCDC
    PCM_setPowerState(PCM_AM_DCDC_VCORE1);

    // Initializes Clock System
    CS_setDCOCenteredFrequency(CS_DCO_FREQUENCY_48);
    CS_initClockSignal(CS_MCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_1 );
    //CS_initClockSignal(CS_HSMCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_1 );
    CS_initClockSignal(CS_SMCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_2 );
    //CS_initClockSignal(CS_ACLK, CS_REFOCLK_SELECT, CS_CLOCK_DIVIDER_1);

    while(1)
    {
    }
    return 1;
}

This is with a "Red Launchpad".  Any ideas?

Thanks,

Rob

  • You need some flash wait states:

    FlashCtl_setWaitState( FLASH_BANK0, 2);
        FlashCtl_setWaitState( FLASH_BANK1, 2);
        PCM_setPowerState( PCM_AM_DCDC_VCORE1 );
        CS_setDCOCenteredFrequency( CS_DCO_FREQUENCY_48 );
        CS_setDCOFrequency(48000000);
        CS_initClockSignal(CS_MCLK, CS_DCOCLK_SELECT, 1);
        CS_initClockSignal(CS_SMCLK, CS_DCOCLK_SELECT, 1);
        CS_initClockSignal(CS_HSMCLK, CS_DCOCLK_SELECT, 1);
    

  • Thanks Keith,
    I think you are right, but before I can try it, it appears I need to do a Factory Reset on my board as described here:
    e2e.ti.com/.../548350
    however, I'm using CCSv7, and nowhere can I find how to run the GEL script found at the end of the thread above. Any ideas?
    Thanks,
    Rob
  • Rob,

       A couple of things.  Keith has already correctly pointed up the need to change the wait states and the Vcore settings per the datasheet:

    Please also be aware that the ADC also has a maximum of 25Mhz:

    And to your original question, I could not find the explicit instructions for the factory reset, so I am providing a link to another post:

    Hope that helps,

    Chris

  • Thanks Chris! Your notes are very helpful. I needed someone to point me to the datasheet. I have been spending all my time in the Family Guide and Driverlib manuals, and forget the datasheet. This will be very helpful once I get my board reset. Unfortunately in Code Composer Studio 7.1 everything is different, and I can't find the Reset Script or a way to load the GEL script supplied in the post I cited above.

    Thanks so much for your pointers. They are an extremely helpful addition to Keith's note!

    Rob
  • Rob,
    I am not sure I understand what you are saying. You should be able to find the GEL script here:

    C:\ti\ccsv7\ccs_base\emulation\gel\msp432_factory_reset.gel

    Are you saying that when you follow the instructions here (e2e.ti.com/.../1843789 )that the MSP432_Factory_Reset is not one of the default scripts (Scripts->default)?

    Thanks,
    Chris

  • Hi Chris,

    Yes, that is correct, but furthermore, things have changed with the .ccxml file as well, so I can't even get past #4, and if I did, the reset script is not there either.  I found a gel script that I could possible load, but I can't find up to date instructions on how to do that with Code Composer Studio 7.1.

    Thanks for taking the time to help me out!

    Thanks,

    Rob

  • Here is an update. I was able to find better instructions for Code Composer 7.1 here: www.ti.com/.../slau575f.pdf
    However, there is no DAP core that shows up. The error I'm getting is:

    CORTEX_M4_0: * WARNING *: The connected device is not MSP432P401R
    CORTEX_M4_0: GEL Output: Memory Map Initialization Complete
    CORTEX_M4_0: GEL Output: Halting Watchdog Timer
    CORTEX_M4_0: Flash Programmer: Reading device TLV failed.
    CORTEX_M4_0: Your XMS432P401R material is no longer supported. We recommend you moving to production-quality MSP432P401R/M silicon by ordering samples at www.ti.com/product/MSP432P401R.
    CORTEX_M4_0: Flash Programmer: Device not recognized
    CORTEX_M4_0: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will not actually be written to the target. Check your linker configuration and/or memory map.
    CORTEX_M4_0: File Loader: Verification failed: Values at address 0x0000193C do not match Please verify target memory and memory map.
    CORTEX_M4_0: GEL: File: /home/frohro/workspace_v7/ADC14_multi_GNU/Debug/ADC14_multi_GNU.out: a data verification error occurred, file load failed.

    So I still can't program the red board. I went back to an old black V1.0 launchpad for the time being.

    Thanks,

    Rob
  • Rob,

        Thanks for the additional details.  Can you try the following?

    Chris

  • Thanks Chris,

    That got a lot closer, but I still get an error about configuration not being correct.  Here are a couple screen shots.  The first shows my config (also the source is pasted below the screen shot), and the second is the error.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <configurations XML_version="1.2" id="configurations_0">
    <configuration XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe_0">
    <instance XML_version="1.2" desc="Texas Instruments XDS110 USB Debug Probe_0" href="connections/TIXDS110_Connection.xml" id="Texas Instruments XDS110 USB Debug Probe_0" xml="TIXDS110_Connection.xml" xmlpath="connections"/>
    <connection XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe_0">
    <property Type="choicelist" Value="1" id="SWD Mode Settings"/>
    </connection>
    </configuration>
    </configurations>

    So sorry to report I'm still unable to resuscitate this board.  

    Thanks again for your persistence helping me with this problem!

    Rob

  • Rob,
    Hopefully you have been able to move on, I have received additional feedback and will post here for the community :

    the customer broke his target configuration… No device is selected.

    Either copy paste this:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <configurations XML_version="1.2" id="configurations_0">
    <configuration XML_version="1.2" id="configuration_0">
    <instance XML_version="1.2" desc="Texas Instruments XDS110 USB Debug Probe" href="connections/TIXDS110_Connection.xml" id="Texas Instruments XDS110 USB Debug Probe" xml="TIXDS110_Connection.xml" xmlpath="connections"/>
    <connection XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe">
    <instance XML_version="1.2" href="drivers/tixds510cs_dap.xml" id="drivers" xml="tixds510cs_dap.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds510cortexM.xml" id="drivers" xml="tixds510cortexM.xml" xmlpath="drivers"/>
    <property Type="choicelist" Value="2" id="SWD Mode Settings">
    <choice Name="SWD Mode - Aux COM port is target TDO pin" value="nothing"/>
    </property>
    <platform XML_version="1.2" id="platform_0">
    <instance XML_version="1.2" desc="MSP432P401R" href="devices/msp432p401r.xml" id="MSP432P401R" xml="msp432p401r.xml" xmlpath="devices"/>
    </platform>
    </connection>
    </configuration>
    </configurations>

    Or go to basic tab and select MSP432P401R.

    If this doesn’t help again, you can delete the target configuration by
    1. right-clicking targetConfigs folder -> New -> Target Configuration File
    2. [Optional] Rename file
    3. Make sure the location is /<ProjectName>/targetConfigs (should be default when right-clicking folder)
    4. Drag and Drop created file into targetConfigs folder (strangely not copied there by default)
    5. Double-click .ccxml file to verify that MSP432P401R (or customer CPU) is selected.

    Hope this helps
  • Thanks!  I was able to move on.

    Rob

**Attention** This is a public forum