1 == 1 is FALSE in interrupt handler?
Posted: Tue Jan 14, 2014 10:39 am
Hi, I am experiencing a strange behaviour in evaluating conditional expressions like 1 == 1 in interrupt handler.
Precisely, inside Dma Rx handler I am using for I2S, I have the following:
static void I2SDmaRxInterrupt(SPIDriver* spip, uint32_t flags)
{
if(spip == &SPID3)
{
serv++;
if(flags == 16) {
/* inside code */
}
}
}
Here flags is 16... but the code inside never gets executed.
serv is incremented to 1.
What could it be?
the flags == 16 is really what I ended using, after trying (flags & DMA_FLAG_TC/HT ecc...).
Thanks.
-g
Precisely, inside Dma Rx handler I am using for I2S, I have the following:
static void I2SDmaRxInterrupt(SPIDriver* spip, uint32_t flags)
{
if(spip == &SPID3)
{
serv++;
if(flags == 16) {
/* inside code */
}
}
}
Here flags is 16... but the code inside never gets executed.
serv is incremented to 1.
What could it be?
the flags == 16 is really what I ended using, after trying (flags & DMA_FLAG_TC/HT ecc...).
Thanks.
-g