User`s guide
Inline Assembly Language and Intrinsics
Intrinsic Functions
186
Targeting MC56F83xx/DSP5685x Controllers
affects all user function calls, run-time supporting function calls, standard library
calls, and interrupts.
3. You must account for any side-effects of enabling modulo addressing. Such a
side-effect is that R0 and R1update in a modulo way.
4. If you need just one modulo pointer is required, use the R0 address register.
Enabling the R1 address register for modulo use also enables the R0 address
register for modulo use. This is true even if __mod_init() or
__mod_initint16() have not explicitly initialized R0.
5. A successful API call does not clear the error code from the error variable. Only
function __mod_stop clears the error code.
Modulo Addressing Error Codes
If you want to register a static variable for error-code storage, use __mod_error().
In case of an error occur, this static variable will contain one of the values Table 7.3
explains. Table 7.4
. lists the error codes possible for each modulo addressing intrinsic
function.
Table 7.3 Modulo Addressing Error Codes
Code Meaning
11 <mod_desc> parameter must be zero or one.
12 R0 modulo pointer is already initialized. An extraneous call to __mod_init
or __mod_initint16 to initialize R0 has been made.
13 R1 modulo pointer is already initialized. An extraneous call to __mod_init
or __mod_initint16 to initialize R1 has been made.
14 Modulo buffer size must be a compile time constant.
15 Modulo buffer size must be greater than one.
16 Modulo buffer size is too big.
17 Modulo buffer size for R0 and R1 must be the same.
18 Modulo buffer data types for R0 and R1 must be the same.
19 Modulo buffer has not been initialized.
20 Modulo buffer has not been started.
21 Parameter is not a compile time constant.