Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 216092

Forum Post: RE: IIR filter of "fixed point dsp library" very slow

$
0
0

Ludwig,

well, in general, some code must be "automatically" executed from RAM, if within your project the following elements are presented (this is common case for example):

1 Main file

#pragma CODE_SECTION(some_isr1, "ramfuncs");

#pragma CODE_SECTION(some_isr2, "ramfuncs");

__interrupt void some_isr1(void);
__interrupt void some_isr2(void);

extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsLoadSize;
extern Uint16 RamfuncsRunStart;

void main(void)
{

...............................some initialization code

memcpy((uint16_t *)&RamfuncsRunStart,(uint16_t *)&RamfuncsLoadStart, (unsigned long)&RamfuncsLoadSize);

InitFlash();

................................some code

}

__interrupt void some_isr1(void)

{

............................

}

__interrupt void some_isr2(void)

{

..............................

}

2 command linker file (*.CMD):

..............................................

SECTIONS
{

/* Allocate program areas: */
.cinit : > FLASHA PAGE = 0
.pinit : > FLASHA, PAGE = 0
.text : > FLASHA PAGE = 0
codestart : > BEGIN PAGE = 0
ramfuncs : LOAD = FLASHD,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
RUN_START(_RamfuncsRunStart),
PAGE = 0

Maybe it makes sense to copy to RAM whole ISR, where you call CUR_Butterworth.

Regards,

Igor


Viewing all articles
Browse latest Browse all 216092

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>