2017-07-22 11:26 PM
Hi,
My application uses and STM32F405. The power supplies are very stable, based on a design I have used in other applications. Dittio for the other hardware peripherals and reset circuit, etc. I have used the 405 in other projects with no such problems as have here.
I have an application that for all intents and purposes, should be written correctly - this based on existing projects framework that has worked well in other applications. I'm using the newest CMSIS libraries (1.81.)
On reset, I printf the RCC->CSR register, and it always returns 0x24000000, meaning that bits 26 (RCC_FLAG_PINRST) and bit 29 (RCC_FLAG_IWDGRST) are set.
The watchdog timer is set correctly - again, I am using the same function to set up and reload the IWDG as in other applications. The timeout is set for 1000ms, I am resetting it at a 250ms rate. I have a hard fault handler to trap and display errors, and that is not getting triggered.
All my interrupts are set up correctly. I'm using FreeRTOS, and have the configLIBRARY_KERNEL_INTERRUPT_PRIORITY set to 14. I have configASSERT defined so that it will print out any errors caught there, but it does not print anything.
Is there any way of determining what is going on?
Thanks for any help you can provide.
2017-07-23 01:39 AM
Hello!
Do you have enabled the hardware watchdog? If yes, this has different timeout values than you set later at your program.
Does this IWDG reset occurs spontaneously or regularly (eg at initialisation phase of program)?
2017-07-23 10:12 AM
'The watchdog timer is set correctly - again, I am using the same function to set up and reload the IWDG as in other applications. The timeout is set for 1000ms, I am resetting it at a 250ms rate. I have a hard fault handler to trap and display errors, and that is not getting triggered.' Yup, it is running. Same function I used successfully in other programs.
It occurs any any time, typically within 10 minutes of launching.
Thanks for your help.
2017-07-23 11:08 AM
Hello again.
If i understand well you put the WDog reload function inside all processes.
Do you use idle task hook function ?
If not, implement it and put also inside the reload function.
In case you dont see any difference , use the hard way! try to isolate the problem by disabling functionalities .:(
2017-07-23 11:47 AM
Hi Vangelis,
I found the problems. In setup of one interrupt, I did NOT have the configLIBRARY_KERNEL_INTERRUPT_PRIORITY set. Also, I switched to a non-blocking binary sempahore to signal my interrupt handlers, and it now works without fault.
Thanks for taking the time to help out!