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.

CCS: Why a timer example do not use the library?



Tool/software: Code Composer Studio

I'm learning TivaC kit, I have done with many other controllers from microchip and from ST. And they are so professional compared with TI. The example project that not use the library that you write, not enough example project for all peripheral. Description of code looks like a buffoonery. 

  • Hello Thanh,

    What example are you referring to? Is it from our latest TivaWare download?
  • Hello Thanh,

    I want to try and help resolve this issue and show the professionalism of our TI offering, can you help me understand what example project you are using currently?
  • I'm using the timer example from TM4C ARM Cortex-M4F MCU v:2.1.3.156. As a normal user, I open declaration , and the IDE open to the definition in the file rom.h.
  • Hi Thanh,

    I think you are not being fair here by not giving enough time for new controller you are learning.
    TI TivaC series controller have on-chip , pre-loaded TivaWare library on ROM that can be used depending on user requirement. This ROM library is to reduce your Flash footprint.

    If you do not want to use ROM loaded Tivaware APIs, just remove 'ROM_' from function call. and you have your API calling to Tivaware library on your PC. Now if you click on open declaration, it will open driverlib file.

    e.g:

    Change function call

    ROM_TimerValueGet(TIMER4_BASE, TIMER_A);

    to

    TimerValueGet(TIMER4_BASE, TIMER_A);

    Thats all.

    BTW, latest Tivaware library available is 2.1.4.178, you would probably wana down load same from app center.

    Hope this helps.

    BR,
    Pranav.
  • two things:

    1) there is nothing that prevents one from coding either with a library or through registers directly. Each offers its own set of +s and -s. only fools think one approach is better than the other all the time.

    2) is the OP simply snipping? yes. in my book, if one presents an argument and eludes the responsibility to back it up, it is snipping.

  • Hello Thanh,

    As Pranav identified, the issue is that the example in question uses ROM_ calls that leverage the TivaWare firmware placed in ROM for Flash space saving. This is an important feature to highlight as many customers, such as Pranav who indicated as such, find the ability to replace many TivaWare calls with ROM_ calls to save Flash space an important benefit.

    Pranav's suggestion to remove the ROM_ tag from in front of API's is the correct method to be able to see the details for each API call.

    Your feedback is important regarding the downside of offering examples that are coded in such a manner, and I apologize that highlighting our ROM_ feature has hindered your ability to quickly understand how to leverage our TivaWare library and example code.
  • I have done this way after taking time to see the function name on the driverlib file and recognize the sample files has ROM_ prefix in the function called, so I had tried removing and get the same result as you mention above. But it is uncomfortable for the new user, and also on the description don't mention about it.