2024-01-29 06:20 AM
Hola,
Desde hace unos días me encuentro con el siguiente error en un programa que había completado. Lo único que hice ese día fue cambiar el tiempo de retraso; No cambié nada más.
[Imagen: Foto 1]
Después de horas de búsqueda, encontré en el foro que borrando la memoria flash se soluciona (Para borrar el flash, simplemente lo conectas presionando el botón de reinicio y conectándote al mismo tiempo). Soluciona el problema, pero sólo hasta que recargue el programa. Después de cargar el programa algo en la memoria se rompe porque me sale un mensaje de que la tarjeta ha sido desconectada y no hay conexión. Además, aparece el error "Manejador de señal llamado () en 0xFFFFFFFE", como puede ver en la imagen.
[Imagen: Foto 2] [Foto 3]
He realizado las siguientes pruebas para identificar cualquier problema:
El código se completó durante 2 meses y se probó y funcionó en más de 50 dispositivos. No sé si será por alguna actualización o algo así, pero pasa con todas las placas (STM32F103C8T6 - STLINK V2 - Software 1.14.1).
2024-01-31 02:38 AM - edited 2024-01-31 02:40 AM
Hello @Pmartine92 and welcome to the Community :);
Thanks to develop your posts in English so it helps us, and the users of our community understand your question and try to help you.
Hello,
For a few days now I have been encountering the following error in a program I had completed. The only thing I did that day was change the delay time; I didn't change anything else.
[Image: Photo 1] After hours of searching, I found on the forum that erasing the flash memory solves it (To erase the flash, you simply connect it by pressing the reset button and connecting at the same time). It fixes the problem, but only until you reload the program. After loading the program something in the memory breaks because I get a message that the card has been disconnected and there is no connection. Also, I get the error "SignalHandler called() at 0xFFFFFFFE", as you can see in the image.
[Image: Photo 2] [Photo 3]
I have performed the following tests to identify any issues:
Partially clear the memory to see if resetting specific lines fixes it.
1. It doesn't matter if I delete a random line or everything; After doing so, the problem is solved.
2. Load some empty code and see if it breaks when dumped into memory. In this case it does not break, and you can do it as many times as you want without having to delete the flash. I started loading all the peripherals into that program and when I configure the RCC it breaks. It breaks a blank code with RCC configuration. What I find most strange is that if I remove the RCC configuration, it still breaks.
3. I tried taking the IOC configuration and importing it into another project and that didn't work either.
4. I took a blank project with the IOC configuration from the actual program and gradually removed everything from the IOC until there was nothing left and it still disconnects when loaded.
The code was completed over 2 months and tested and worked on 50+ devices. I don't know if it is due to an update or something like that, but it happens with all boards (STM32F103C8T6 - STLINK V2 - Software 1.14.1). I have not found a solution to this problem and I don't know if anyone else has had this problem and can help me.
Are you using an example from STM32CubePackage?
Can you please share your code?
This FAQ may help you: How to solve debugger connection issues - STMicroelectronics Community
Thank you.
Kaouthar
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.
2024-02-05 02:25 AM - edited 2024-02-05 07:41 AM
Attached is the main.c.
No it is not an example of STM32CubePackage
2024-02-05 03:36 AM
I think that the problem it can to be for this lines:
RCC->APB2ENR |= RCC_APB2ENR_AFIOEN; // Enable A.F. clock
AFIO->MAPR |= AFIO//AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
But , this lines are there from 2 month ago.
2024-02-05 07:41 AM
Already found a solution.Thanks
2024-02-05 07:48 AM - edited 2024-02-05 08:04 AM
Hi @Pmartine92 ;
Glad to know that the issue is solved :).
Could you please share the solution and click on "Accept as Solution" on your reply.
This may help the community members who are experiencing the same issue.
Thank you for your contribution in STCommunity.
Kaouthar
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.