This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GH6PM: use of cosine function in tiva

Part Number: TM4C123GH6PM


I have made a code and it takes input from cos and sin function.Unfortunately code behaves unexpectedly,I have used math.h and stdlib , code works fine in c but not in tm4c123ghpm.

sig->real =A * sine(w*i + phase);

when i implement this line code stops but when i comment this code code works fine.

  • Hello Muhammad,

    You may be running into stack problems while using the math library, how much stack is allocated in your project?

    You can see this by going to Project Properties -> CCS Build -> ARM Linker -> Basic Options, and then look for the "Set C system stack size" value.

    I expect it will be something like 512 or 1024 bytes, which if so, try with 2048 or even 3072 bytes and see if the issue resolves with either setting.