We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have a problem with Crystal, if I use 96000000hz for HSI with a RTOS(UIP kernel) in MM32F103(cortex-m3) , then I meet following problems.
1:Sometimes ,if program run into function SystemInit, it will jump into hardfault.
2:Sometimes ,if program run into function _scatter, all the data copy from FLASH to RAM is wrong!!!
3:Sometimes , the program is fun.
But if I choose 24000000hz for HSI, every thing is fun, I do not know why.
Fake STM32 ?
Make sure you have sufficient wait states for code to run at 96 MHz, expect it would need 3
thanks you Pier, but what's the meaning of sufficient wait states? and what's the meaning of 'need 3'? I don't understand.
Flash memory is slow, will run at 24 MHz, but needs wait states to run at 96 MHz. Wait state adds an access delay, read manual.
ok thanks
in addition, where are local arrays in interrupt functions stored? heap or stack?
Please keep to 1 question per thread!
Arrays are no different to any other local variables, and the fact it's an Interrupt function makes no difference.
Automatic variables are always on the stack
Heap is used by malloc, etc.
Allocating local arrays in an interrupt handler doesn't sound like a good idea.
ok,I try to modify it, thanks.