Tool/software: Code Composer Studio
Hi all! I am a beginner in programming with TI's microcontrollers and have been assigned the use of the LaunchXL F280049C.
My project aim is to decode data coming from a SPI slave and transmit it out via SCI/UART.
I watched Gautam Iyer's Get Started video and did the necessary configuring of the XDS110 port from normal JTAG to 2-pin cJTAG, and thus can enter debug mode.
I was able to set up pins for GPIO use and verified this using external LEDs and an oscilloscope, using GPIO_setPinConfig and GPIO_setPadConfig.
To this end I have been looking at the example code from CCS Resource Explorer for both SCI and SPI, using the driverlibs. However, even in running example code, I am unable to see any output on my pins with an oscilloscope - they are at 0V.
I have not changed any of the Launchpad's external switches or jumpers.
Is there anything I might have missed out on adding in the code?
For instance, to enable SPIA's pins, I do this
// Pin definitions from pin_map.h
// PIN 15 (GPIO 16) -> MOSI pin
GPIO_setPinConfig(GPIO_16_SPISIMOA);
GPIO_setPadConfig(16, GPIO_PIN_TYPE_PULLUP); // push-pull output
GPIO_setQualificationMode(16, GPIO_QUAL_ASYNC); // as per SPI user manual.
// PIN 7 (GPIO 56) -> SCLK pin
GPIO_setPinConfig(GPIO_56_SPICLKA);
GPIO_setPadConfig(56, GPIO_PIN_TYPE_PULLUP); // push-pull output
GPIO_setQualificationMode(56, GPIO_QUAL_ASYNC); // as per SPI user manual.
// PIN 14 (GPIO 17) -> MISO pin
GPIO_setPinConfig(GPIO_17_SPISOMIA);
GPIO_setPadConfig(17, GPIO_PIN_TYPE_PULLUP); // pullup input
GPIO_setQualificationMode(17, GPIO_QUAL_ASYNC); // as per SPI user manual.
// end experimental hwconfig.
// PIN 39 (GPIO 11)
GPIO_setPinConfig(GPIO_11_GPIO11); //GPIO_11_SPISTEA;
GPIO_setPadConfig(11, GPIO_PIN_TYPE_PULLUP);
GPIO_setDirectionMode(11, GPIO_DIR_MODE_OUT);
GPIO_setQualificationMode(11, GPIO_QUAL_ASYNC);
// LED (Flash as a status output)
GPIO_setPadConfig(DEVICE_GPIO_PIN_LED2, GPIO_PIN_TYPE_STD);
GPIO_setDirectionMode(DEVICE_GPIO_PIN_LED2, GPIO_DIR_MODE_OUT);
And to enable SCIA, I do this
// GPIO28 is the SCI Rx pin.
GPIO_setPinConfig(GPIO_28_SCIRXDA);
GPIO_setPadConfig(28, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(28, GPIO_QUAL_ASYNC);
// GPIO29 is the SCI Tx pin.
GPIO_setPinConfig(GPIO_29_SCITXDA);
GPIO_setPadConfig(29, GPIO_PIN_TYPE_PULLUP);
Have I missed out on anything? Thank you for your help, in advance!