2024-10-04 09:23 AM
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?
2024-10-04 11:35 AM
> 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:
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.
2024-10-04 11:54 AM
É 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.
2024-10-04 12:48 PM
Please write in English.
Thank you for your understanding.
2024-10-04 01:17 PM
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.