I'm using multiple external events through GPIO to wake the MCU from sleep. How can I check what source caused the event? Is there a register that I can read? What I understand is that the WFE instruction also clears the event register so I assume a...
In my code I use I2C. But when I reset the MCU with my debugger (I-jet from IAR) the I2C peripheral indicates BUSY as soon as it is initialized by the MX_I2C1_Init() function.But if I add the following I2C reset in the MX_I2C1_Init() function before ...
How do I change MCU in STM32CubeMX project?I have tried to create a new project and the use the "import project". But it does not import any user code from the c-files.Could someone reply the steps needed to also import the user code.
Is there any disadvantage of turning off the ADC clock between conversions (to save power)?If I do this for example:RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
... Do one conversion...
RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, DISABLE)...
I'm using a 32L152C DISCOVERY board.I have trouble getting really low current in stop mode (< 10µA).This is the simple code I test with:int main(void)
{
PWR_UltraLowPowerCmd(ENABLE);
PWR_FastWakeUpCmd(DISABLE);
// Enters STOP mode
PWR_Ent...
Now I managed to get the current down.The solution was to set all GPIO to analog mode. I guess this is because the JTAG/SWD pins draws some current when enabled.Now the current decreased down to 370µA.But this made the LD3 (green LED) glow faintly. S...