Tool/software: Code Composer Studio
Hi,
I am trying to communicate the PGA970 with SPI . I followed the steps described in "7.3.1.14.2 Activating the SPI Interface" which said that
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.
3. If the SPI master is to communicate to the PGA970 device with the microprocessor in reset, reset the
microprocessor by writing 1 to the MICRO_RESET bit in the MICRO_INTERFACE_CONTROL register. If the
SPI master is to communicate with the PGA970 device while the microprocessor is running, then the
COMBUF registers are used for communication.
But,after I programmed the codes as follows in the CFG_Peripheral_Config() function and load the program to the PGA970(using XDS200), I couldn't debug the pga970 anymore. When I debug the PGA970, it is said that "Failed system Reset" and "(Error -614 @ 0x0) The target indicates there is an error condition from a previous SWD request. Clear the error the condition, and try the SWD request again.(Emulation package 6.0.407.3)“ in the console.
The codes are:
DIGITAL_Interface_Config(SPI_ENABLE | OWI_DISABLE | OWI_XCVR_DISABLE | OWI_DEGLITCH_FILTER_1MS);
MICRO_INTERFACE_CONFIG(DIGITAL_IF_SELECT | MICRO_NORESET | DEBUG_UNLOCK);
I programmed ”GPIO_HIGH()“ before the codes above,so the LED connected to that GPIO was on when power on. But,when encountered with the codes above, something should be happened that I couldn't enter the interrupt ADC handler function since I have programmed GPIO_TOGGLE() in the interrupt ADC handler function and the LED is not blinking.
So, what is the problem and how can I deal with it?
Thank you very much.
Regards,