Hi,
I am using the PSP drivers 01.20.00 on the C6747 EVM and can't get the expected output. I started with the example that is included with the PSP package. I modified to just transmit a data pattern every second out SPI1 instead of SPI0. I monitor the SPI pins with a scope. Using all the default SPI param settings from the example, the operation is (I think) correct except for the CS line. Configuration uses the following modes:
Spi_OpMode_DMAINTERRUPT and Spi_PinOpMode_SPISCS_4PIN. When I run the program the CS line remains high and never changes states. By trial and error, I modified the value of spiParams.spiHWCfgData.csDefault to 0. ( driver default value is 0xFF, which, by the way isn't even valid according to the SPI users guide). With a value of 0, the CS line will start low and change to high before the data transmission and then goese back to low at the end of the transmission. So this is the opposite logic that I would like. I looked in the source code of the driver and it looks like the CSNR field of SPIDAT1 register is being set to 0xFF (which again is not valid according to the User's Guide). The Guide describes that a value of 1 drives the pin active high and a value of 0 drives the pin active low. How can I change the value of this? It looks like there is no parameter field in the driver APIs that directly control this register/field. Or is there something else I'm doing wrong? Has anyone else experienced these issues?
The other issue is the C2T and T2C time delays. I have these set to 0 (actually the default is 0 and I don't change this). In the case where the CS seems to be functioning, these delays are very long. The CS transitions from H to L and there is a 40 microsec delay on the scope before the clock kicks in. The clock is set at 30 MHz so this would be 1,200 clock cycles if I were to measure the delay in terms of clock delays. Similarly the T2C delay is about 22 us. I also toggle a GPIO pin before/after each burst (each issue of GIO_write) and the CS line has only a slightly less delay than that. Nothing close to what the User's Guide describes as proper operation for the CS. Thanks in advance for any advice/help.
Mike