AnsweredAssumed Answered

Problem with STDV-Cosmic compiler

Question asked by nam_hieu.le_huy on Feb 5, 2013
Latest reply on Apr 27, 2013 by M.E
I am a newbie at cosmic and I met something strange when using STVD with cosmic compiler to run my project. I hope that somebody can explain it for me.
This is my project:

It is my main:
#include "peripheral.h"
#include "si4432.h"

static WORKING_AREA(waProtocolThread, 384);
void main(void)
#if 1
    /*Test NTC_Comparator 2*/

     chThdCreateStatic(waProtocolThread, sizeof(waProtocolThread), NORMALPRIO, CP_SENSORThread, NULL);
  while (TRUE) {};

And this is my subfunction SI_ReadRegister() stored in si4432.c
uint8_t SI_ReadRegister (const uint8_t Addr) {
    uint8_t Rpl;
    SI_ReadWriteByte (Addr);
    Rpl =  SI_ReadWriteByte (0);
    return Rpl;

The problem is: I want to set parameter Addr in subfunction to 0x26, however the value of this parameter is another number, and the value of Rpl is 0x26!
I attach a picture when debuging.