Hello!
I tried to set system frequency 2 MHz via function SetSysClock(), but after that microcontroller goes into hardfault. In datasheet I found information that Fsys range supports this frequency. I tried to disable SysTick interrupt but this didn't help. I read the implementation of SetSysClock() and info about related registers, it seems that all ok. I suggest that problem may be because flash won't work at this frequency (because if hardfault handler contains custom reset function calling from flash, it won't reset. On the other hand, if I use _PFICSystemReset(), which is inlineable and only uses peripheral register, it resets). But I would like to know real reason of that.
Hello! I tried to set system frequency 2 MHz via function SetSysClock(), but after that microcontroller goes into hardfault. In datasheet I found information that Fsys range supports this frequency. I tried to disable SysTick interrupt but this didn't help. I read the implementation of SetSysClock() and info about related registers, it seems that all ok. I suggest that problem may be because flash won't work at this frequency (because if hardfault handler contains custom reset function calling from flash, it won't reset. On the other hand, if I use _PFICSystemReset(), which is inlineable and only uses peripheral register, it resets). But I would like to know real reason of that.