cancel
Showing results for 
Search instead for 
Did you mean: 

stack problem and privilege mode

ezrab
Associate II
Posted on June 16, 2011 at 14:48

hi.

i am using the STM32f103 chip and i am having all sord of problem that takes me to the Hard Fault inturpt .

when i check the SCB->CFSR register i am getting all sord of errors like :

''the processor has attempted to access a coprocessor.''

or

''The processor has attempted to execute an undefined instruction.''

i read alot and i found that i can change the privilege mode for safty reason so that the software cannot accsess importent register in the cpu i am hoping that it will help me solve the problems.

my question is how do i change that from what i can find i need to change the control register but how can i chnage that what is he called?

i found all that data here by the way:

http://www.st.com/stonline/products/literature/pm/15491.pdf

 

thanks.
23 REPLIES 23
ezrab
Associate II
Posted on July 03, 2011 at 17:20

hi.

i tested the oscillator freq from the external crystal and for some reason it seams quite  low.

why is that ?

how can i incrise it so it will be less sensitive to Noise.

thanks.

Posted on July 03, 2011 at 21:15

i tested the oscillator freq from the external crystal and for some reason it seams quite  low.

The frequency is low, or the voltage?

1.0 - 1.2 Vpp is where I would typically expect clocks to be, does the spec suggest it should be something else?

This is the range external TCXO parts would be at. You could utilize a 2x external clock and a CMOS flip-flop, but I doubt this will address your issue.

Excessive supply noise (100 mV?) is likely to interfere with the threshold for the oscillator.

How is the noise entering your system?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ezrab
Associate II
Posted on July 04, 2011 at 08:06

hi.

the noise is mostly electromagnetic it only happens when i activate the ENABLE.

when i increased the Dead Time i had much less problems.

when i check the Evalution board (STM32VLDISCOVERY) the oscillator voltage was higher somehow its about 1.72V.

how?

thanks.

Posted on July 04, 2011 at 20:00

Ok, I get the EMI bit, but HOW is it entering your circuit? Through large current spikes on the supplies, through the inputs, or induced in tracks within your circuit. Do you have good power distribution on the board, do you have shielding, does it behave better when in a box? How many layers does the board have.

I think we earlier pointed out that the bulk capacitance on the STM32 appeared to be less than recommended.

The voltage observable on the crystal is going to depend on the characteristics of the part you picked, track size/length, and the external load capacitance you have hanging off it.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..