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.

MSPM0G3507: TI-Drivers and DriverLib Peripheral Configurations

Part Number: MSPM0G3507
Other Parts Discussed in Thread: SYSCONFIG,

Tool/software:

Hello,

I am working on a project which is interfacing with some external devices using I2C, PWM and ADC (to name a few peripherals). I have been doing some pre-development investigation of the MSPM0 SDK (version 2.5.1.0) and found there are two types of drivers that I can use with my project: DriverLib and TI-Drivers. Given that TI-Drivers seems more abstracted than using the drivers within DriverLib I plan on integrating it with my project. The issue I am facing is that TI-Drivers only has the following modules: ADC, DMA, GPIO, I2C, SPI and UART. Unfortunately, since I need to use the PWM peripheral, I need to also use the DriverLib. This means my project will use both driver libraries.

With that in mind, I had the following question:

  1. Is there a problem with integrating both drivers into my project? 

I also noticed that the way you configure the system when using a DriverLib only project and a TI-Drivers project is different. DriverLib utilizes the SysConfig tool to configure the chip peripherals (clock, gpio, etc). TI-Driver does not have something similar. It has pre-made ti_drivers_config.c and ti_msp_dl_config.c files within the example project. 

With that in mind, I had the following question(s):

  1. How do you configure the peripherals for a TI-Drivers project? This includes clock speed, pins, peripherals, etc.
  2. How do you use a project if you want to use both DriverLib and TI-Drivers? Does SysConfig still work?

My project will require the use of the following peripherals:

  • UART
  • ADC
  • GPIO
  • I2C
  • PWM
  • Watchdog

Thank you for your time and your help.

  • Is there a problem with integrating both drivers into my project? 

    Never done this before, but you can have a try.

    A non-rtos TI driver example shown here:

    C:\ti\mspm0_sdk_2_05_00_05\examples\nortos\LP_MSPM0G3507\drivers\uart_echo

    For driverlib(DL), you can use a drivelib(DL) example to generate a PWM init code, and directly include code into drivers project.

    Since there are a lot of DL example here: C:\ti\mspm0_sdk_2_05_00_05\examples\nortos\LP_MSPM0G3507\driverlib

    You will get lots help from DL example and GUI syscfg.

    How do you configure the peripherals for a TI-Drivers project? This includes clock speed, pins, peripherals, etc.

    Drivers comes along with Freertos, for system configuration, now, in this example C:\ti\mspm0_sdk_2_05_00_05\examples\nortos\LP_MSPM0G3507\drivers\uart_echo

    It uses default clock, no config need to run.

    UART will init pins and itself in UART_OPEN.

    How do you use a project if you want to use both DriverLib and TI-Drivers? Does SysConfig still work?

    2 method

    1. use syscfg generated code, manually copy them into your drivers project.

    2. import syscfg to your drivers project  directly, and use syscfg auto generate hardware code, call some of them in main.c

    From my point of view, if you don't use freertos, DL is already good enough to use, but you still need to write/package some Read/Write function for I2C/UART.

  • Helic,

    Thank you for you reply. I have not got to this part of my project, but I will try what you are recommending once I get to that step. For this reason, I will keep this thread open and come back to it if it works. 

    Summary: Will try what is recommended to see if it works. If it does, resolve thread; otherwise reply with issues.