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);
    

  • In reply to Keith Barkley:

    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
  • In reply to Rob Frohne:

    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

    ---------------------------------------------------------------------------------------------------------

           Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------- 

  • In reply to Chris Sterzik:

    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
  • In reply to Rob Frohne:

    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

    ---------------------------------------------------------------------------------------------------------

           Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------- 

  • In reply to Chris Sterzik:

    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

  • In reply to Rob Frohne:

    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
  • In reply to Rob Frohne:

    Rob,

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

    Chris

    ---------------------------------------------------------------------------------------------------------

           Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------- 

  • In reply to Chris Sterzik:

    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