TI中文支持网
TI专业的中文技术问题搜集分享网站

MSP432驱动程序指导文件中 DriverLib in ROM这一小节想表达什么意思 不是很理解 可以解释一下吗 谢谢

With all MSP432 devices, a copy of DriverLib is included within the device’s ROM space. This
allows programmers to take advantage of using high level APIs without having to worry about
additional memory overhead of a flash library. In addition to a more optimized execution, the user
can drastically cut down the memory footprint requirement of their application when using the
software Driver Libraries available in ROM.

Accessing Driver Library APIs in ROM is as easy as including the rom.h header file, and then
replacing normal API calls with a ROM_ prefix. For example, take the following API from the pcm.c
module that changes the power state to PCM_AM_DCDC_VCORE1:

PCM_setPowerState(PCM_AM_DCDC_VCORE1);

After including the rom.h file, all that would have to be done to switch to the ROM equivalent of the
API would be add the ROM_ prefix to the API:

ROM_PCM_setPowerState(PCM_AM_DCDC_VCORE1);

While the majority of DriverLib APIs are available in ROM, due to architectural limitations some
APIs are omitted from being included in ROM. In addition, if any bug fixes were added to the API
after the device ROM was programmed, it is desirable to use the flash version of the API. An
"intelligence" has been created to account for this problem. If the user includes the rom_map.h
header file and uses the MAP_ prefix in front of the API, the header file will automatically use
preprocessor macros to decide whether to use a ROM or flash version of the API.

MAP_PCM_setPowerState(PCM_AM_DCDC_VCORE1);

这一段话想表达什么意思   

知道的告诉一下  谢谢

HG:

就是说MSP432芯片在出厂的时候,会把一些驱动固化在ROM里, 这样可以帮客户节省FLASH的空间。但是这样做的缺点是如果有bug或者更新了,ROM里面没法改,调用这样的驱动需要ROM_什么,比如ROM_PCM_setPowerState(PCM_AM_DCDC_VCORE1);

为了克服ROM没法改的缺点,我们的芯片还支持一般的写法,就是把代码放在FLASH里面,就是大家传统的做法,如果客户flash够得话用起来还是很方便的。如果调用flash,就直接用PCM_setPowerState(PCM_AM_DCDC_VCORE1);就可以了。

当然了,我们还提供了MAP_,就是会自动选择调用flash还是ROM 中的,更加智能了。

大概就这么个意思,具体怎么用根据你的实际情况来~

灰小子:

回复 HG:

ti 的msp432支持固化在rom里的库函数,这一点用起来很方便,很节省flash空间。

xue liu1:

回复 HG:

HG

就是说MSP432芯片在出厂的时候,会把一些驱动固化在ROM里, 这样可以帮客户节省FLASH的空间。但是这样做的缺点是如果有bug或者更新了,ROM里面没法改,调用这样的驱动需要ROM_什么,比如ROM_PCM_setPowerState(PCM_AM_DCDC_VCORE1);

为了克服ROM没法改的缺点,我们的芯片还支持一般的写法,就是把代码放在FLASH里面,就是大家传统的做法,如果客户flash够得话用起来还是很方便的。如果调用flash,就直接用PCM_setPowerState(PCM_AM_DCDC_VCORE1);就可以了。

当然了,我们还提供了MAP_,就是会自动选择调用flash还是ROM 中的,更加智能了。

大概就这么个意思,具体怎么用根据你的实际情况来~

赞(0)
未经允许不得转载:TI中文支持网 » MSP432驱动程序指导文件中 DriverLib in ROM这一小节想表达什么意思 不是很理解 可以解释一下吗 谢谢
分享到: 更多 (0)