Guten Nachmittag :)
ich hab einen STM32L1, der nach dem STOP-Mode manchmal nicht richtig
funktioniert.
Beispielsweise hängt er dann in einer Re-Initialisierung des ADCs:
1 | /* Enable ADC1 */
|
2 | ADC_Cmd(ADC1, ENABLE);
|
3 | /* Wait until the ADC1 is ready */
|
4 | while (ADC_GetFlagStatus(ADC1, ADC_FLAG_ADONS) == RESET) {
|
5 | }
|
6 |
|
7 | ADC_TempSensorVrefintCmd(ENABLE);
|
8 | while (!(PWR->CSR & PWR_CSR_VREFINTRDYF)) {
|
9 | }
|
Manchmal in der oberen While-Schleife, manchmal in der unteren.
Ich hatte nach dem STOP-Mode die Hardware einfach nochmal komplett neu
initialisiert und meistens funktioniert das ohne Probleme.
Die beste Problemlösung bisher war:
1 | PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);
|
2 | NVIC_SystemReset();
|
Kennt das Phänomen zufällig jemand und weiß Abhilfe?
Viele Grüße,
Mampf