Part Number: MSP432P4111
Hi,
My goal is to optimize power consumption in a multithreaded TI-RTOS system on an MSP432P4111 with an I2C bus calling TI I2C Drivers from SimpleLink SDK 3.40.01.02. I use I2C as master only, and I want to keep the I2C peripheral in reset mode when it's not needed and activate it only when it's needed.
In this application note (9.1, page 12) it recommends keeping peripherals in reset mode by setting UCSWRST register bit.
I have managed to do that in an application layer, enabling/disabling I2C before and after each call to I2C_transfer() function.
However, I think that a better approach would be to integrate this reset/activate funcionality inside the I2CMSP432.c driver source file right at the point where primeTransfer() is called, so I can still benefit from the thread safety semaphores and message queues that the driver offers. Is there a supported way to do this?
Another possible option I was considering is to set/clear the UCSWRST when entering/exiting Sleep mode through the use of a PowerRegisterNotify function or Idle Power Policy Custom Function.
What would be the best way to achieve this?
Thank you very much for your attention,
Álvaro