Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: BOOSTXL-CC3120MOD
Tool/software: Code Composer Studio
Hello, I'm trying to write some code that will be able to program a Boostxl-cc3120MOD over UART using my launchpad. To do this I need to configure SCIB to communicate through pins 18 & 19 in Idle-Line Multiprocessor Mode. I am having some trouble with the SCI modules not being able to output anything through the pins on the launchpad, using SCIA though the mini USB works fine however. I posted my code bellow, any suggestions as to what I'm missing would be appreciated.
Cheers!
Device_init();
SysCtl_setLowSpeedClock(SYSCTL_LSPCLK_PRESCALE_1);
//
// Disable pin locks and enable internal pullups.
//
Device_initGPIO();
//
// SCI Rx pin.
//
GPIO_setMasterCore(19, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_19_SCIRXDB);
GPIO_setDirectionMode(19, GPIO_DIR_MODE_IN);
GPIO_setPadConfig(19, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(19, GPIO_QUAL_ASYNC);
//
// SCI Tx pin.
//
GPIO_setMasterCore(18, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_18_SCITXDB);
GPIO_setDirectionMode(18, GPIO_DIR_MODE_OUT);
GPIO_setPadConfig(18, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(18, GPIO_QUAL_ASYNC);
//
// Initialize interrupt controller and vector table.
//
Interrupt_initModule();
Interrupt_initVectorTable();
//
// Initialize SCIA and its FIFO.
//
SCI_performSoftwareReset(SCIB_BASE);
//
// Configure SCIA for echoback.
//
HWREGH(SCIB_BASE + SCI_O_CCR) &= ~(SCI_CCR_ADDRIDLE_MODE);
SCI_setConfig(SCIB_BASE, DEVICE_LSPCLK_FREQ, 921600, (SCI_CONFIG_WLEN_8 |
SCI_CONFIG_STOP_ONE |
SCI_CONFIG_PAR_NONE));
SCI_resetChannels(SCIB_BASE);
SCI_resetRxFIFO(SCIB_BASE);
SCI_resetTxFIFO(SCIB_BASE);
SCI_clearInterruptStatus(SCIB_BASE, SCI_INT_TXFF | SCI_INT_RXFF);
SCI_enableModule(SCIB_BASE);
SCI_performSoftwareReset(SCIB_BASE);
msg = 'A';
HWREGH(SCIB_BASE + SCI_O_CTL1) |= (SCI_CTL1_TXWAKE);
receivedChar[0] = (HWREGH(SCIB_BASE + SCI_O_CTL1));
receivedChar[1] = HWREGH(SCIB_BASE + SCI_O_CCR);
while(loopCounter)
{
HWREGH(SCIB_BASE + SCI_O_CTL1) = receivedChar[0];
SCI_writeCharBlockingFIFO(SCIB_BASE, msg);
while(HWREGH(SCIB_BASE + SCI_O_CTL1) == receivedChar[0]){}
if(SCI_getRxFIFOStatus(SCIB_BASE)!=SCI_FIFO_RX0)
{
receivedChar[0] = SCI_readCharBlockingFIFO(SCIB_BASE);
receivedChar[1] = SCI_readCharBlockingFIFO(SCIB_BASE);
if(receivedChar[0]==0x00 && receivedChar[1]==0xCC)
{
loopCounter = 0;
}
}
}
SCI_performSoftwareReset(SCIB_BASE);
ESTOP0;