cancel
Showing results for 
Search instead for 
Did you mean: 

Write to STM32F103C8 flash

valter_meconi
Associate III

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?

4 REPLIES 4
TDK
Guru

> 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".

É 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.

@valter_meconi 

Please write in English.

Thank you for your understanding.

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

It is a matrix with 8 ports to control 5 buttons and 14 LEDs, it is working very well, but they flicker when I go to record in the flash, I did a test without using the timer4 interrupt, these flickers do not occur in the LEDs, only when I use the timer. I tried a routine in the main program after scanning the matrix and nothing improved.