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.

MSP430FR2355: ROM Driver

Part Number: MSP430FR2355
Other Parts Discussed in Thread: MSP430WARE, FFTLIB

Good-day, I have question about ROM driver in MSP430FR2355.

I use this msp and IAR embed workbench.

This msp430 has ROM of read only. I think this area includes driver. Default sample code does not be use automaticaly, right? 

Therefore I searched this driver, and found it in MSP430WARE.

MSP430WARE has source file and include file of driver.

I can use those file on my environment. And can call "ROM_" function, but the function address's code all zero. I think that because I use IAR simulator.

So I'm searching rom image of driver. And I would also like to have the correct linker file (xcl) if possible.

For another series of MSP430, the ROM image seems to be included in the MSP430WARE.

 Ex: slau574k.pdf MSP432 P.22

I have not been able to find any documentation for the above example regarding MSP430FR2355.
Also, I could not find any ROM image for this microcontroller in MSP430WARE. And I would also like the exact xcl file.

Please teach me where to find it.

  • Hi Yutaka,

    Great question, and yes, if you are using IAR simulator it will not work.

    But first, for other readers of this posting, I'll explain where to find this information.

    When you download MSP430WARE, by default it is installed on your PC at C:\ti\msp430ware_3_80_13_03 (this is what I have installed, yours may be different).

    Navigate to the directory path C:\ti\msp430ware_3_80_13_03\driverlib\driverlib\MSP430FR2xx_4xx

    There you will find the driverlib source files for the MSP430FR2xx_4xx family of MCUs.

    Look for the file "rom_map_driverlib.h" This is a listing of all the ROM functions.  Depending on the device, certain functions will be include their ROM while others may not. 

    So how do you know which ROM functions are included in each device?  Take a look in the directory path C:\ti\msp430ware_3_80_13_03\driverlib\driverlib\MSP430FR2xx_4xx\rom_headers.  There you will find the rom_driverlib file for the various devices.

    The method to access the ROM functions is to use the macros in rom_map_driverlib.h

    Let's take a look at the function for enabling ADC interrupts:

    #ifdef ROM_ADC_disableInterrupt
    #define MAP_ADC_disableInterrupt                                              \
            ROM_ADC_disableInterrupt
    #else
    #define MAP_ADC_disableInterrupt                                              \
            ADC_disableInterrupt
    #endif

    Always use the macros starting with MAP_.  The compiler will check if the function exists in the device's ROM table and if so, it will use the ROM_ function call.  If the function is not included for this device, the compiler will choose the standard function that is pulled in from the driverlib source code.

    Now, to answer you question specifically about IAR, the linker file (xcl) is selected automatically based on the device you select.

    And, if you have added the driverlib directory and its contents to your project, and use a #include <driverlib.h> in the file that uses the ROM function, the compiler will do the rest.

  • Hi Dennis,

    Thank you for your advices.

    I have question.

    - xcl file

    I changed default xcl from my xcl in my embed workspace. I checked the file. But I seem to the xcl file dose not write 20bit rom area address.

    Can I use this defaul xcl for the ROM function?

    - compiler settings of IAR

    My workspace had set code model is large and data model is small. These both have to be large, right?

    - ROM image

    Please check previous pdf’s page 23 of msp432.

    I seem to the file set additional write option for ROM image. I think why msp430fr2355 dose not include the rom image in msp430ware?

    With that and the proper xcl, I thought the rom function wouldn't be an address anomaly. Is this correct?
    Of course, since I use simulator, it may not work and may get stuck in a waiting function in the rom function.However, I think there are many codes that just only set. Can I get an image from you?
    If not, can I do this effort by reading the ROM image from the microcontroller?

    - ROM function

    Can the ROM function embedded in a microcontroller at the time of manufacture at TI suddenly change? Can my code(old ROM code) end up referring to the address of a different function if I don't realize that you guys changed them?

    Best regards


  • Hi Dennis,

    Could you support above my question?

  • Hi Yutaka,

    First let me make sure we are using the same terms here.  ROM is "read only memory" pre-programmed at TI and can never be modified.  FRAM is the memory where you can place your application code and modify if needed.

    There is no ROM image provided with MSP430Ware. Your large code and small data memory model is correct.

    Next, let me make sure I understand what you are attempting to do ...if you are using a simulator (in other words you are not programming an acutal MSP430), then there is no way to implement any ROM function.  Keep in mind the ROM functions are the exact same driverlib functions you see in the driverlib source files. Since you are not using an actual MCU, you must instead compile and link the driverlib source code files.

    You can only use ROM functions if programming/debugging an actual MSP430 MCU.

    Regarding a ROM function changing - no way.  ROM is permanent memory that can not be modified.

  • Can the ROM function embedded in a microcontroller at the time of manufacture at TI suddenly change? Can my code(old ROM code) end up referring to the address of a different function if I don't realize that you guys changed them?

    Looking at driverlib/MSP430FR2xx_4xx/rom_headers/rom_driverlib_fr235x.h the interface to ROM functions is via a lookup table of function pointers.

    Where the function pointer to each function is at a fixed address in ROM. At run-time a call to a ROM function reads the function pointer in ROM, which then points at the actual address of the function in ROM.

    That allows TI to modify the ROM functions for later silicon revisions in a way that shouldn't break compatibility with existing programs. 

  • Hi Yutaka,

    It's been a few days since I have heard from you so I’m assuming your question has been answered.
    If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

  • Hi Dennis,

    If our system does not use DriverLib or FFTLib in this msp430, can we change the code model to small model?
    I have tried to using DriverLib, but due to the overhead of calling the ROM function increased ROM area...

    Or could I be doing something wrong calling the ROM function?

  • Hi Yutaka,

    Yes, you can switch to small code model.

    Regarding a call to a ROM function, I'm not sure why you are seeing a large overhead.  As Chester pointed out, a call to any ROM function is simple using a function pointer defined in rom_driverlib_fr235x.h file, or am I not understanding your question.

    I think I'm still not fully understanding what you are attempting.

    Let me summarize my thoughts - You can use small code/data model, but you won't be able to call any ROM function.  To use the ROM functions you must use the large code model, but keep in mind it does slightly increase the overall size of your code because the compiler is using 32-bit vs 20-bit addressing. Using a ROM function won't consume any FRAM space because these functions are in ROM.  All that is needed is to include the appropriate header files and call a ROM function, ex - ROM_ADC_getInterruptStatus();

  • Hi Yutaka,

    It's been a few days since I have heard from you so I’m assuming your question has been answered.
    If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

**Attention** This is a public forum