Other Parts Discussed in Thread: C2000WARE
Hello,
I'm looking through the provided F28004x driverlib examples for SCI (e.g. sci_ex1_echoback.c) in C2000Ware 3.01.00.00.
It seems there are several repeated function calls and I'm trying to understand if they are necessary.
The code segment in sci_ex1_echoback.c that initializes the SCI is as follows:
// // Initialize SCIA and its FIFO. // SCI_performSoftwareReset(SCIA_BASE); // // Configure SCIA for echoback. // SCI_setConfig(SCIA_BASE, DEVICE_LSPCLK_FREQ, 9600, (SCI_CONFIG_WLEN_8 | SCI_CONFIG_STOP_ONE | SCI_CONFIG_PAR_NONE)); SCI_resetChannels(SCIA_BASE); SCI_resetRxFIFO(SCIA_BASE); SCI_resetTxFIFO(SCIA_BASE); SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_TXFF | SCI_INT_RXFF); SCI_enableFIFO(SCIA_BASE); SCI_enableModule(SCIA_BASE); SCI_performSoftwareReset(SCIA_BASE);
Couple questions:
- Is there a need for SCI_performSoftwareReset() to be called at both the start and the end of SCI initialization?
- SCI_enableModule() is already called as part of of SCI_setConfig(), does it need to be called again separately?
- This is not in the above code segment, but earlier in the same example during GPIO initialization for the SCI TX pin, the qualification mode is set to async. Is this necessary? My understanding was that qualification is only necessary for inputs.
Thank you!