How do I set up interrupts on SHARC?
The header file, adi_int.h, provides prototypes of the SSL interrupt handling APIs and macros that define interrupt IDs. The file can be found in the CCES subdirectory “<install_path>/SHARC/include/services/int” and is included in C/C++ source as follows:
The following functions are used to install, enable and uninstall interrupts
ADI_INT_HANDLER_PTR pfHandler, void *pCBParam, bool bEnable);
The interrupt IDs macros are defined as the interrupt name prefixed with “INT_CID_”, for example, ADI_CID_GPTMR0I. For a list of the interrupt IDs that are defined for each platform, see the file <<install_path>/SHARC/include/interrupt.h.
Note that <signal.h> now only provides support for the signal-related functions and macros that are required by the C and C++ standards.
Examples using these functions can be found in the ADSP-21469 Board Support Package. See, for example, the “Core_Timer” example, which uses both high- and low-priority timer interrupts.
See the System Run-Time Documentation in the CrossCore Embedded Studio Help for more information on the software support for interrupts
Differences from VisualDSP++
VisualDSP++ supported a number of methods of configuring interrupts, each with their own limitations, which led to many user errors and problems. To simplify interrupt support, and to provide a more consistent approach to programming interrupts across Analog Devices’ DSPs, these methods have been removed. The APIs described above are the only supported way to configure interrupts.
in general I understand how to implement interrupts in CCES. My problem is that at the moment it doesn't work in my custom module.
If have the following output:
[Error li1260] "libc.dlb[dispatched_handler_activate.doj](seg_pmco):0x19" value of .__set_imask1-.__set_imask0 can not be calculated at load time.
The same output comes for a couple of other values. The reason for the errors is my call of the function adi_int_InstallHandler() in my INIT_<>Algo function.
Can anyone help me with that?
Are you able to provide a copy of the project that produces this error? If so you can send it to email@example.com, along with a copy of your ProductInfo.html (availble from the Help menu in CCES) and any steps required to reproduce the error.
Be sure to include a link to this thread when you contact processor.tools.support.