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.

MSP432P401V: Driver Lib Functions Included in ROM code..

Part Number: MSP432P401V

Hi Team MSP432,

According to the MSP432 Driver Lib docs.. "While the majority of DriverLib APIs are available in ROM, due to architectural limitations some APIs are omitted from being included in ROM."  How can I determine which driver lib functions are (and more importantly which are NOT) included in ROM?

Thanks, Merril

  • Merril,

    I  do not know of an easy way to discern this except looking through the rom.h amd rom_map.h files.  Here you will find the definitions and how the MAP_ prefix functions are either mapped to the ROM or to the Flash APIs .  Typically, we recommend using the MAP_ prefix and allowing the driverLib make the determination of the correct API to use for you.  If you want to force the use of the Flash API you can simply leave off the prefix.  This will not work with Flash APIs if the back of Flash you are programming to is the same as the one you are executing from.  

    C:\ti\simplelink_msp432p4_sdk_3_10_00_08\source\ti\devices\msp432p4xx\driverlib

    Regards,

    Chris

  • OK, I reviewed the rom_map.h and rom.h files and I see what you are saying. If you want to be explicit in your code, I reckon you would want to drop the MAP_ prefix?

    And so, for functions that are not in ROM, you need to include the appropriate SDK source file found into the project: i.e. adc.h, cs.h?

    But, this does not explain the Example Projects though. The "adc14_multiple_channel_no_repeat" and "cs_clock_source_init" projects do not include these source files. NOTE: I did not actually build these projects since they do not build out-of-the-box.

    Lastly, how do I determine which version of DriverLib exists on my CPU, to then determine if a newer/better Flash version exists?

  • That is correct.  You can explicitly use the flash based APIs by simply removing the prefix. 

    The includes are found within #include <ti/devices/msp432p4xx/driverlib/driverlib.h>.

    I am not quite following the statement that the projects do not build out of the box.  Are you importing the projects from the SDK or just copying files from the SDK into an existing project?  

    The ROM Diver Library revision is found at memory location 00201018h in the device information memory.  In the datasheet this is refered to as part of the Tag-Length-value structure.  

    Regards,

    Chris

  • I am opening these projects in IAR directly from the SDK.

  • Thank you.  I mistakenly assumed CCS.  Let me verify that in IAR that the projects are being imported properly.  

    Did you setup the argument variables as discussed here?

    Regards,

    Chris

  • I hadn't because I didn't want to go down that rabbit hole. But I just did and it doesn't compile. The project is expecting the files to be in the iar folder not one folder up. I'll get it fixed up and see if it compiles w/o the two Examples in question will compile without adc.h or cs.h.

  • In the adc14_multiple_channel_no_repeat example project for the P4111, ROM_ADC14_getMultiSequenceResult is NOT defined. So MAP_ADC14_getMultiSequenceResult is mapped to ADC14_getMultiSequenceResult. The linker finds this file.

    After looking at the Example Project thoroughly, it is including driverlib.a in Linker/Extra Options. This appears to be the missing link. My code compiles now without adding adc14.c or cs.c to my project.

    Thanks!

**Attention** This is a public forum