cancel
Showing results for 
Search instead for 
Did you mean: 

STM32W108 program an infinite loop

e_zine
Associate
Posted on August 22, 2011 at 11:51

Hi:

      Hello, everyone, I want to ask a question about STM32W108 I according tothe official schematics for the design (in some places has been modified).STM32W108 chip pin is 40, but with RF4CE firmware library, but to which the programming procedure, into an assertion that the program is always a function, and ultimately into an infinite loop, I do not know why. Errors appear here: halInit ()----> halPowerUp ();----> halInternalInitAdc (); ----> stCalibrateVref (); ----> halCommonGetMfgToken (& biasTrim, TOKEN_MFG_ANALOG_TRIM_BOTH);, to here the next sentence assertionfunction: if (biasTrim.auxadc == 0xFFFF) {assert (FALSE);} will loop on the inside, and I do not know 

typedef struct {

   int16u iffilterH;

   int16u biasmaster;

   int16u moddac;

   int16u auxadc;

   int16u caladc;

} TokTypeMfgAnalogueTrimBoth;

I do not know where the error causes this result, and who can help me? Thank you!

#stm32w108
2 REPLIES 2
Posted on August 23, 2011 at 01:07

It's asserting because you have a bogus value in the structure. An assert() is there to check and catch stupid settings, the assert triggers because it found one.

You need to work backwards from where it's asserting, and find where it's initializing the structure, and writing values in to it. Try searching on ''auxadc ='' for instance would be a pretty basic step.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
e_zine
Associate
Posted on August 23, 2011 at 04:17

When I

single-step

simulation

,

to

this sentence

: stCalibrateVref ();,

pop up

a

dialog box

,

shown above

do not

find some

files

,

such as

transmission.c,

I

find the

installation

directory

, but no

transmission.c

file

I

would like to ask

,

this

file

will

affect

my program

it?

If it does,can

you 

send me a

transmission.c

file?

Thank you

!