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.

MSP432 LaunchPad CSKEY doesn't change

Dear MSP users,

I recently bought MSP432 LaunchPad and I'm trying to do simple stuff based on Code examples in CCS (version: 6.1.2.00015). However, I am unable to change DCO frequency, since I'm unable to change CSKEY to 0x695A. I have tried to launch sample code msp432p401_cs_02, but it fails to compile with error: #20 identifier "CSKEY" is undefined    msp432p401_cs_02.c    /msp432p401_cs_02    line 77    C/C++ Problem, which is natural since CSKEY is not present in any header file.

Then, I have tried to access this register directly via pointer:

volatile uint32_t *cskey_pointer;

cskey_pointer = (volatile uint32_t *)0x40010400;

*cskey_pointer = (uint32_t)0x0000695A;

but failed.

I can change DCO frequency and almost any other register value in Registers window during debug, but when I type in CSKEY value it doesn't change.

Does anyone know how to solve this?

Thanks in advance.

UPDATE

Thanks Ryan and Josue. After downloading new 6.1.3 CCS everything worked with new syntax. I believe that was update problem - CSS had updated header files, but not the MSPWare examples.

The accessing via pointer also works now. I recommend everybody to download new ccs 6.1.3, since you cannot upgrade to it.

  • Hello Romans,

    The most recent msp432p401r.h file does not have a definition for CSKEY, it sounds like you are using the MSP Classic format instead of CMSIS. I recommend checking for updates inside of CCS or upgrading to v6.1.3. But the debugger will indeed prevent you from changing the CSKEY value.

    Regards,
    Ryan
  • Romans, I had the same problem in my msp432, I recommend you, if you want to change the CLK for one specific application use the  msp432p401_cs_01 example code and change the DCO like the code,Also read the Clock System Introduction (page 292), to know what kind of clock sources you have in the MSP and what features they have. :

    CS->KEY = CS_KEY_VAL;
    CS->CTL0 = 0;
    CS->CTL0 = CS_CTLO0_DCORSEL_3;  // here you change the DCO frecuency, read MSP432P4xx Family Technical Reference Manual page 307 
    CS->CTL1 = CS_CTL1_SELA_2 | CS_CTL1_SELS_3 | CS_CTL1_SELM_3;
    CS->KEY = 0;307;


**Attention** This is a public forum