cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Deinit on Master system reset

Arun Ravi
Associate
Posted on May 22, 2017 at 11:05

Hello,

I'm working on a project in which there is an inter-board I2C link between the master MSP430F5438A and the slave STM32F207IG. Now whenever the master MSP430 resets(due to the external watchdog), the PE bit (Peripheral Enable bit) present in the I2C control register of STM32F2 is set to zero. This reset of the PE bit causes a deinitialisation of the I2C link. Any idea why the PE bit changes? 

3 REPLIES 3
Posted on May 22, 2017 at 14:07

According to RM, PE bit is not cleared by hardware, so it's the software which clears it.

JW

Posted on May 24, 2017 at 07:10

Okay, I'm running Micrium 3 OS on MSP430. The PE bit does not reset when Micrium is not running on MSP, the reset occurs only when Micrium runs on MSP.Is it possible that the RTOS is a cause for the reseting of the PE bit? If yes HOW and WHY? 

Posted on May 24, 2017 at 08:58

I know nothing of this OS. Does the OS actually handle the I2C directly? If not, it's unlikely it will write to a hardware register, so it's influence is indirect/coincidental.

In debugger, you can set a data breakpoint upon write to the I2C control register, try to start in that direction, although it may be a dead-end if that register is written too often in normal operation. You can also investigate which parts of your code (or any 'library' included) writes to the control register. There's still a possibility of a runaway pointer, but it also sounds quite unlikely given the IO space is relatively far from any memory space.

JW