Skip to main content
Associate II
October 4, 2024
Question

Write to STM32F103C8 flash

  • October 4, 2024
  • 1 reply
  • 1067 views

eu, eu estou tendo um problema com o meu software ao escrever para o flash. O que está acontecendo? Estou usando o temporizador 4 para alternar LEDs e botões, e até agora tudo bem, mas o problema ocorre quando vou escrever no flash. Quando eu apago, os LEDs começam a piscar, como se o MCU estivesse preso. Ele até grava no flash, mas os LEDs continuam piscando. Estou usando o STM32F103c8. Alguém poderia me ajudar?

1 reply

TDK
Super User
October 4, 2024

> I, I'm having a problem with my software when writing to Flash. What's happening? I'm using timer 4 to toggle LEDs and buttons, and so far so good, but the problem occurs when I'm going to write in the flash. When I turn it off, the LEDs start flashing, as if the MCU is stuck. It even records in the flash, but the LEDs keep flashing. I'm using STM32F103c8. Could anyone help me?

Here is one example of how to write to flash:

STM32CubeF1/Projects/STM32F103RB-Nucleo/Examples/FLASH/FLASH_EraseProgram/Src/main.c at ac682c6bc31ea589f3c552531171aa0c9faeb0a9 · STMicroelectronics/STM32CubeF1 (github.com)

 

Your problem description could be improved. What board is this? What LEDs are flashing? Generally, flashing LEDs do not indicate the processor is stuck.

Debugging the code would probably be productive. If this board doesn't allow SWD debugging, perhaps look into a board that does.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate II
October 4, 2024

É uma matriz com 8 portas para controlar 5 botões e 14 LEDs, está funcionando muito bem, mas eles piscam quando vou gravar no flash, fiz um teste sem usar a interrupção timer4, essas flickers não ocorrem nos LEDs, apenas quando uso o timer. Tentei uma rotina no programa principal depois de escanear a matriz e nada melhorou.

mƎALLEm
Technical Moderator
October 4, 2024

@valter_meconi 

Please write in English.

Thank you for your understanding.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.