Other Parts Discussed in Thread: C2000WARE
Is there additional driverLib initialization required for a very simple SPI example? Please see the code below.
The data in present in the SPITXBUF register when debugging (0x014D = 333), but there is no data or clock present on the controlCard pins when viewed with a scope. Checking pins 67 (SPISIMOA), 69 (SPISOMIA), and 71 (SPICLKA).
What have a missed?
Kindly,
Graham
#include "F28x_Project.h"
#include "driverlib/spi.h"
/**
* main.c
*/
void main(void)
{
uint32_t delay;
InitSysCtrl();
SPI_disableModule(SPIA_BASE);
SPI_setConfig(SPIA_BASE, 100000000, SPI_PROT_POL0PHA0, SPI_MODE_MASTER, 500000, 16);
SPI_enableModule(SPIA_BASE);
while (1)
{
SPI_writeDataNonBlocking(SPIA_BASE, 333 );
// Delay for a bit.
for(delay = 0; delay < 2000000; delay++)
{}
}
}