herunterladen
![](https://oss-datasheet.aipcba.com/html/8211861AA4B257A7AC23D7DBD326D31D/bg1.png)
Application Report
SPRA177A – August 2005
1
Using C to Access Data Stored in Program Memory on the
TMS320C54x DSP
David M. Alter DSP Applications - Semiconductor Group
ABSTRACT
Efficient utilization of available memory in a TMS320C54x DSP sometimes requires the
placement of data in program space memory (as opposed to data space memory).
However, accessing this data using the C programming language is problematic, since
the C-compiler provides no mechanism for accessing program space. This application
note presents a solution for accessing data stored in program space memory using C on
the TMS320C54x DSP. A C-callable library of six assembly code functions for accessing
data in program memory (including extended program memory) is also provided.
This application report contains project code that can be downloaded from this link.
http://www-s.ti.com/sc/psheets/spra177a/spra177a.zip
Contents
Introduction .............................................................................................................................................2
Generating 23-bit Program Memory Pointers in C...............................................................................2
The Code Download ...............................................................................................................................2
Download Package Contents............................................................................................................2
The PFUNC Code Library .................................................................................................................3
Example of PFUNC Library Use .......................................................................................................4
Constructing the Program Memory Data Values.......................................................................5
References...............................................................................................................................................5
Appendix A. PFUNC Function Library Technical Reference ..............................................................6
Revision History....................................................................................................................................12
Tables
Table 1.
Description of Code Download Files................................................................................3
Table 2. PFUNC Library Functions..................................................................................................3