This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Stop mode issues

Hello, I'm trying to use stop mode on my MCBSTM32E eval board (MCU STM32F103ZE). I've found examples in Keil installation folders. It seems to work til I enable the Systick timer. Indeed, in this case the stop mode is ignored and the systick interrupt happens as usual without any effect. In the example, the Systick is disabled before entering stop mode and re-enable after. Why do we need to do so because in the Reference Manual (RM0008) page 52 (table10) it is said that the instruction is ignored if flags are not reset, but it is not the case here. I thought that by activating stop mode it would stop clocks and so the systick timer. Does anyone have this kind of trouble ?
Thanks in advance.

Parents
  • Hello Terri,

    I know now what was wrong in my code. In fact, as I did not use the general EXTI line 9 I removed it from the ST example. By doing that, the structure of the EXTI line 17 was not full as two parts of it was initialize in the previous EXTI. It means that the structure has value which were in the stack before the EXTI initialization. My code now works normally.
    However, I can now say that the Keil debugger does not work well with the stop mode. Indeed, I know my code works cause once I download it into my board, I can see my leds toggle every 3seconds as I want, but if I start the debugger, it does not work anymore. I tried to find what was going wrong and I saw that the DIVL register of the RTC was weird. In fact it changes continuously which is not wishable. I hope this will help those who wants to use the debugger but I also hope that someone knows what it is possible to do in order to fix that.
    Best regards

Reply
  • Hello Terri,

    I know now what was wrong in my code. In fact, as I did not use the general EXTI line 9 I removed it from the ST example. By doing that, the structure of the EXTI line 17 was not full as two parts of it was initialize in the previous EXTI. It means that the structure has value which were in the stack before the EXTI initialization. My code now works normally.
    However, I can now say that the Keil debugger does not work well with the stop mode. Indeed, I know my code works cause once I download it into my board, I can see my leds toggle every 3seconds as I want, but if I start the debugger, it does not work anymore. I tried to find what was going wrong and I saw that the DIVL register of the RTC was weird. In fact it changes continuously which is not wishable. I hope this will help those who wants to use the debugger but I also hope that someone knows what it is possible to do in order to fix that.
    Best regards

Children