Other Parts Discussed in Thread: SYSCONFIG
I'm developing an I2C slave driver and now require to cooperate with LPDS mode.
As the master does not know when the CC3235 is awake i would always signal a wakeup using a falling edge on GPIO2 then send read/write a message after certain delay.
The LPDS so far seems to work the device enters and leaves periodically the sleep mode that I verified by
- setting a GPIO(9) in LOW parked state and HIGH active state -> monitorable when LPDS is entered/exited
- debugger disconnects when I enable the policy
I have registered this function to unsing the Power_registerNotify with the PowerCC32XX_AWAKE_LPDS flag
int I2CCC32XX_postNotify_test(unsigned int eventType, uintptr_t eventArg, uintptr_t clientArg) { GPIO_setConfig(MP913, pinconfig_save); GPIO_write(MP913, 1); // Reconfigure the hardware when returning from LPDS I2CCC32XX_initHw_test((I2C_Handle) 0); dma_hndl = UDMACC32XX_open(); dma_rx_setup(); //i2c_timer_start(50000); GPIO_write(MP913, 0); return (Power_NOTIFYDONE); }
Now there are 2 problems I encountered.
First this function does not seem to be called whatsoever. There is a testpoint on our PCB (MP913 = "i2c_hw_ini" in this picture) and I use this to indicate for entering/leaving this notify function.
You can see that MP914_sleep is going up and down as we periodically enter/exit sleep -> the GPIO is parked/activated upon return.
Yet the "i2c_hw_init" (MP913) that is set high in the notify callback does not move at all.
Secondly if I activate that uncommented line "i2c_timer_start" which opens and starts a oneshot timer I end up in a blocked AWAKE state.
The function again seems not to be called as the test point GPIO (MP913) is not going high at all but the MP914_sleep shows the ECU is AWAKE.
Between these two recordings only this single uncommented line is the difference.
Also even if we assume the GPIO set is not happening in the callback properly (MP913 does not cause action) but every other function is called and executed the I2C master still can not read/write the CC3235 because I get bus errors or NACK -> which points me to the same issue I2C is not inited (init function was not called).
Question #1: despite clearly entering the sleep/awake I do not see the postNotify getting called
Question #2: how is this possible that a seemingly not called function change causes the CPU to stay awake