os 3.0.2 crash with extStart and i2cStart
Posted: Wed Dec 09, 2015 3:45 pm
Hello,
I'm very troubled of this problem I discovered today.
I have an application that use stmf429 with SPI,i2c and external interrupt.
the ext configuration is this one:
the i2c config is this one:
I developed the feature to read from accelerometer from i2c and from bluenrg through spi in two different branches (so when I've used the accelerometer, I don't have bluenrg and viceversa). Today I put them together. But I have a big problem, the application crashes during initialization of the bluenrg (it involves a reset of the bluenrg chip that triggered an external interrupt).
If I'm avoiding to give i2cStart(&I2CD1, &i2cfg1); the bluenrg works and OS doesn't hang.
But if I gave i2cStart(&I2CD1, &i2cfg1); even without any other thread that try to use i2c, the system hangs almost immediately.
Is there any limitations about using i2c and exti driver?
Does anyone could give me a hint about what is happening?
Thanks a lot!
I'm very troubled of this problem I discovered today.
I have an application that use stmf429 with SPI,i2c and external interrupt.
the ext configuration is this one:
Code: Select all
const EXTConfig extcfg = {
{
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_RISING_EDGE | EXT_MODE_GPIOC, extcb1},//bluenrg
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_FALLING_EDGE | EXT_MODE_GPIOG, extcbTouch},//capsense
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL},
{EXT_CH_MODE_DISABLED, NULL}
}
};
the i2c config is this one:
Code: Select all
static const I2CConfig i2cfg1 = {
OPMODE_I2C,
100000,
STD_DUTY_CYCLE,
};
I developed the feature to read from accelerometer from i2c and from bluenrg through spi in two different branches (so when I've used the accelerometer, I don't have bluenrg and viceversa). Today I put them together. But I have a big problem, the application crashes during initialization of the bluenrg (it involves a reset of the bluenrg chip that triggered an external interrupt).
If I'm avoiding to give i2cStart(&I2CD1, &i2cfg1); the bluenrg works and OS doesn't hang.
But if I gave i2cStart(&I2CD1, &i2cfg1); even without any other thread that try to use i2c, the system hangs almost immediately.
Is there any limitations about using i2c and exti driver?
Does anyone could give me a hint about what is happening?
Thanks a lot!