This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432P401R: UART driver is not saving dataLength

Part Number: MSP432P401R

The TI driver does not work with 7-bit data length. I am using simplelink_msp432p4_sdk_1_60_00_12. Is it possible to rebuild the TI driver library? What is the best way to work around this problem?

UARTMSP432.c, UARTMSP432_open function does not transfer the dataLength parameter to the object. Below are lines 1085 to 1112 for reference:

/*
* Store UART parameters & initialize peripheral. These are used to
* re/initialize the peripheral when opened or changing performance level.
*/
object->state.readMode = params->readMode;
object->state.writeMode = params->writeMode;
object->state.readReturnMode = params->readReturnMode;
object->state.readDataMode = params->readDataMode;
object->state.writeDataMode = params->writeDataMode;
object->state.readEcho = params->readEcho;
object->readTimeout = params->readTimeout;
object->writeTimeout = params->writeTimeout;
object->baudRate = params->baudRate;
object->stopBits = params->stopBits;
object->parityType = params->parityType;
object->readFxns =
staticFxnTable[object->state.readMode][object->state.readDataMode];
object->writeBuf = NULL;
object->readBuf = NULL;
object->writeCount = 0;
object->readCount = 0;
object->writeSize = 0;
object->readSize = 0;
object->state.writeCR = false;
object->state.txEnabled = false;
object->state.rxEnabled = true;
object->state.callCallback = false;
initHw(object, hwAttrs, clockFreq);

  • Hello Jeffrey,

    Thanks for bringing this to our notice. Looks like this bug is present in the driverlib too. I will file a bug report for both, TI-Drivers and driverlib, so that it can be fixed in the future release.

    As far as workaround is concerned, in the application code, after calling UART_open(), follow the steps below:
    * Disable the USCI module
    * Set the UART in 7-bit data mode
    * Enable USCI module

    Hope this helps!

    Regards,
    Sai
  • Hi Sai,
    Is there a way for me to rebuild the TI-driver and Driverlib libraries? I found another issue with the TI-Driver PWM function. The period is not getting set properly.
    For example:
    SMCLK frequency = 24MHz
    PWM frequency = 6MHz
    Using the TI-driver, actual frequency is coming out 4.8MHz (SMCLK/5).
    The TAxCCR0 register should be set to 3 instead of 4.
    Thanks,
    Jeffrey
  • Hello Jeffrey,

    TI-Drivers can be built using command line. Please refer and update the "imports.mak" file to ensure that all the software components required to build TI-Drivers are in the expected location.

    If all the necessary components are installed correctly, the following steps should build the TI-Drivers.
    * Change directory to the TI-Driver's folder
    * Run make

    Please start a separate thread to discuss the PWM TI-Driver issue. If we club too many questions into the same thread, it becomes very confusing to others when the refer this thread later.

    Thanks,
    Sai

**Attention** This is a public forum