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.

CCS/PGA970: pga970 cannot load code after setting up spi

Part Number: PGA970
Other Parts Discussed in Thread: USB2ANY

Tool/software: Code Composer Studio

Problem: PGA970 cannot upload code

 

Dear support,

 

Suddenly I cannot access the memory of the Cortex of the pga970 anymore. It is not working since I tried to setup the SPI interface of the Cortex. I changed the example code:

   // enable SPI

   DIGITAL_Interface_Config(SPI_ENABLE);

   // enable digital interface

   MICRO_INTERFACE_CONTROL=(IF_SEL);

 

 

to enable the SPI port. Could it be the case that this conflicts with the XDS200 debugger. The USB2Any works fine. I have worked with the XDS several days and did several debug session without any problem but now the code cannot be loaded any more.

 

I did the following tests:

 

  1. The test connection of the XDS200 is passed
  2. Checked all the settings according to Software Quick Start sldu025.pdf
  3. Checked the internal 2 control lines of de XDS200 these look okay
  4. I always get the error:


    The strange thing is the Cortex registers are accessible while some PGA970 registers are not accessible: 



    Also the code memory is not available: 

 

Do you have any idea what might be wrong?

 

  • Hi Cor,

    Can you please reupload your images? If you initially copied and pasted them into the post directly they will not post properly. You will have to use the "Insert/Edit Media" button in the toolbar at the top of the post editor.

    When the M0 is in running mode many of the registers are not accessible via the digital interface to prevent both the digital interfaces and the M0 from trying to access a single register at the same time.

    The SPI_EN in the DIG_IF_CTRL register can be set in your M0 code, and this will allow the SPI to send commands to reset the M0.

    Typically the MICRO_INTERFACE_CONTROL register IF_SEL bit will only be set to 1 when you are also putting the M0 into reset (setting the register to 0x03). Setting the IF_SEL bit to 1 allows the digital interfaces to access the control and status registers, and blocks the M0 from accessing those registers.

    In short, you should not set the IF_SEL bit unless you are placing the M0 in reset, but it is fine to enable the SPI through your M0 code.

    Regards,

  • Hello Scott,

    Thank you very much for your help.

    If got it working now. I communicate with the PGA over SPI using the COM_BUF. The M0 can stay continuously running mode in this way as you said.

    I was mislead by the manual because it says:

    7.3.1.14.2 Activating the SPI Interface
    To activate SPI communication, perform the following steps in order:
    1. Enable SPI by writing 1 to the SPI_EN bit in the DIG_IF_CTRL register.
    2. Enable the digital interface by writing 1 to the IF_SEL bit in the MICRO_INTERFACE_CONTROL register.

    As soon I do step 2 the M0 goes into reset. So by setting MICRO_INTERFACE_CONTROL to 0x01, I read back someway or another 0x03. I do not understand why?

    Thank you very much,

    regards Cor