# Increasing processing power

**URL:** <https://forum.sierrawireless.com/t/increasing-processing-power/3554>\
**Category:** Open AT\
**Created:** [August 13, 2009, 1:06am UTC](https://forum.sierrawireless.com/t/increasing-processing-power/3554 "2009-08-13T01:06:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CellRemote](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@CellRemote](https://forum.sierrawireless.com/u/CellRemote)\
**Post date:** [August 13, 2009, 1:06am UTC](https://forum.sierrawireless.com/t/increasing-processing-power/3554/1 "2009-08-13T01:06:40Z")

</div>

Hi,  
I am using the Q2687 G, I am doing some serious processing, I already set the clock mode to BOOST (max clock speed), I would like to know is there any way to get the CPU to process only my code and then afterwards do the normal OS operations, basically setting my code to higher priority?

Any advice will be greatly appreciated.  
Riaan

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.sierrawireless.com/u/davidc)\
**Post date:** [August 14, 2009, 3:05am UTC](https://forum.sierrawireless.com/t/increasing-processing-power/3554/2 "2009-08-14T03:05:01Z")

</div>

Hiya,

I doubt that you can get any more out of the Q2687.

The Radio/GSM application section has priority (due to some very tight real-time constraints) and the OpenAT application is run as a task/function within the overall operating system - and you don’t have ANY control over the GSM/radio software.

Maybe you could shut down the GSM stack (AT+CFUN???) and then see if you have any more processing cycles - but I doubt it!

ciao, Dave

---

<div class="post-metadata">

**Author:** ![CellRemote](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@CellRemote](https://forum.sierrawireless.com/u/CellRemote)\
**Post date:** [August 14, 2009, 6:39am UTC](https://forum.sierrawireless.com/t/increasing-processing-power/3554/3 "2009-08-14T06:39:12Z")

</div>

Thanks for the reply,

I can’t shutdown the gsm stack, we have developed a voice over IP application, works very well, it’s just the conversion time from PCM to AMR. The AMR codec has got optimization for the ARM4 and 5E processors, that uses assembler in the C code, but when I activate this I get a lot of bad command with the assembler code, I know this code work in other environments, so I assume it is open at, please let me know if there is any issues with inserting assembler into Open AT c?

Regads,  
Riaan

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.sierrawireless.com/u/davidc)\
**Post date:** [August 17, 2009, 5:48am UTC](https://forum.sierrawireless.com/t/increasing-processing-power/3554/4 "2009-08-17T05:48:28Z")

</div>

Hiya,

> [@CellRemote](#):
>
> we have developed a voice over IP application, works very wel

Nice!

> [@CellRemote](#):
>
> The speex codec has got optimization for the ARM4 and 5E processors

Are you sure that the Wavecom CPU is an ARM4 or ARM5E? I seem to recall reading somewhere (but can’t put my finger on it at the moment) that the WMP100 is based on the ARM7 or ARM9 core. If that is the case, then you may well have issues with different ASM op-codes between processor variants. Spend some time going through the WMP100 docs and see what you can find…

As far as inlining assembler into C, remember that OpenAT is using (by default) the GCC cross-compiler. A howto on inlining assembly code for GCC is available [here](http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html). There’s plenty of other notes available on the internet - search for gcc assembler in Google.

Please let us know how you get on.

ciao, Dave

---

<div class="post-metadata">

**Author:** ![CellRemote](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@CellRemote](https://forum.sierrawireless.com/u/CellRemote)\
**Post date:** [August 19, 2009, 11:14am UTC](https://forum.sierrawireless.com/t/increasing-processing-power/3554/5 "2009-08-19T11:14:43Z")

</div>

Ya, the voip is nice to have completed, I will set a complete post later on about the implementation.

I have read up about the ARM core, it is the ARM946, now this ARM has got build in DSP functions, that is why wavecom support the AMR voice codec, this is supported by the ARM processor, I do inline assembler coding to try and make use of the DSP functions, but get “bad command” errors, here is an example of one of the inline assembler code fragments that make use of the DSP functions:

static inline spx\_word32\_t MULT16\_16(spx\_word16\_t x, spx\_word16\_t y)  
{  
int res;  
asm (“smulbb %0,%1,%2;\n”  
: “=&r”(res)  
: “%r”(x),“r”(y));  
return(res);  
}

This function gives me the following error: “bad instruction `smulbb r0,r6,r3’”  
Is there anything I need to set before using inline assembler? Why is this code not working although it is supported by the ARM946 processor?

Would appreciate any help,  
Thank!  
Riaan

---

<div class="post-metadata">

**Author:** ![CellRemote](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@CellRemote](https://forum.sierrawireless.com/u/CellRemote)\
**Post date:** [August 19, 2009, 12:09pm UTC](https://forum.sierrawireless.com/t/increasing-processing-power/3554/6 "2009-08-19T12:09:57Z")

</div>

I saw that you need to include “dspfns.h” for the GCC compiler to access the DSP functions, but this is nowhere to be found in the OpenAT environment… Please help, where can I find the necessary include files to use the DSP functions in OpenAT

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [August 19, 2009, 12:40pm UTC](https://forum.sierrawireless.com/t/increasing-processing-power/3554/7 "2009-08-19T12:40:26Z")

</div>

I think you really need to check with Wavecom to see if this is actually possible for an Open-AT application.

Remember that your application is just a “task” running within the Wavecom OS - you do not have complete, unfettered access to the “raw” CPU…

---

<div class="post-metadata">

**Author:** ![CellRemote](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@CellRemote](https://forum.sierrawireless.com/u/CellRemote)\
**Post date:** [August 19, 2009, 12:48pm UTC](https://forum.sierrawireless.com/t/increasing-processing-power/3554/8 "2009-08-19T12:48:09Z")

</div>

Sure I do not have full control over the CPU, but you are able to insert assembler code into your OpenAT, or am I wrong?
