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.
I am have pretty significant doubts about what code is going into the ROM area on the MSP432P401R. I am using XMS432P401R Rev C on a MSP-EXP432P401R launch pad board. Not sure what is actually burned into the ROM.
But I've downloaded msp432ware 3.50.0.2 (which from what I understand is the latest). This is supposed to include driverlib 3.21.0.5 which according to the header in driverlib.h is indeed 3.21.0.5. Here is the structure of the files I'm looking at.....
Now if I look at what is in driverlib/driverlib/MSP432P4xx/dma.c and compare against what is in driverlib/rom/MSP432P4XX/driverlib.c there are significant differences. If I'm looking at dma.c vs. the dma parts of driverlib.c, I see things like:
notice the Hungarian notation on the right. This is rampant throughout driverlib.c. If this is what is in the ROM it very clearly doesn't match what is in main area of the driverlib.
thoughts?
eric
Hello Eric,
The ROM code that you have in your driverlib.c file might differ in notation, however it should be binary compatible with the the code that you see in the individual peripheral source files. Between the time that the ROM image was made and the DriverLib was released the code was changed to be in a "CMSIS standard" code format instead of the mixed Hungarian notation that you see in the ROM driverlib.c file.
As far as being able to tell if the ROM code is actually being reached, as long as the TARGET_IS_MSP432P4XX is defined in your project settings the ROM functions should be available. To give a bit of background, you can see the following lines of code in the"rom.h" file"
#if defined(TARGET_IS_MSP432P4XX) #define ROM_ADC14_enableReferenceBurst \ ((bool (*)(void))ROM_ADC14TABLE[20]) #endif
Additionally, in the rom_map.h file you see the following type of defines:
#ifdef ROM_ADC14_initModule #define MAP_ADC14_initModule \ ROM_ADC14_initModule #else #define MAP_ADC14_initModule \ ADC14_initModule #endif
This makes it so that if you call the MAP_FooBar functions, it will automatically call the ROM function if available. This allows TI to "patch out" functions that might have issues in ROM by simply releasing another header file. Note that if you call the ROM functions the compiler will not be able to inline function calls. If you are concerned about optimizing your code the most for speed, it would be a good idea to just call the flash based DriverLib APIs for smaller functions to allow the compiler to inline function calls.
Best Regards,
**Attention** This is a public forum