Hi, Do you have faced with this problem ? The USB debug adapter runs but the IDE debugger not. I can put breakpoint on the first line of the main but no break, no timer it generated too, when i stop running no stop on the code line executing. It seems there is a problem just before the main call.
thx
The USB debug adapter runs but the IDE debugger not. I can put breakpoint on the first line of the main but no break, no timer it generated too, when i stop running no stop on the code line executing. it would be helpful if you would tell us Which chip which USB adapter which IDE debugger
Erik
Hi, C8051F50XDK, Silicon Labs USB Debug Adpater, Keil A51, C51, BL51, Silicon Labs IDE.
Richard
Erik will then spend some time looking at it and he will advise you as to what must be modified.
already done
Hi, Thx for your quick responses, indeed it seems to be the watchdog, before main call, which reset. But do you know how what to write in the WATCHDOG macro in INIT.A51 file ?
here is my current watchdog reset macro. but seem to not work. however LST file show the macro at right place.
User-defined Watch-Dog Refresh. ; ; If the C application contains many initialized variables uses a watchdog ; it might be possible that the user has to include a watchdog refresh into ; the initialization process. The watchdog refresh routine can be included ; in the following MACRO and can alter all CPU registers except ; DPTR. ; WATCHDOG MACRO MOV 0CFH,#78H ENDM
mister orange,
have you disabelled the macro's in the ide?
thanx
hi, i'm using the silabs IDE with Keil compiler. so there is no macro options.
here part of LST file.. 003B 156 ?C_START: 003B 900000 F 157 MOV DPTR,#?C_INITSEG 003E 158 Loop: 159 WATCHDOG 003E 75CF78 160+1 MOV 0CFH,#78H 0041 E4 161 CLR A
i mean it's the watchdog reset method that not working..
it is 100 times easier to see what it is if you do not show code using macros BTW why are you even using a macro for something you only do once?
Hi, See Cx51.chm, "searching" with keyword: "watchdog" and you will see why ?
Thx
CX51 has no idea in the world how a SILabs watchdog works.
WHY do you REFUSE to do what i suggest?
THE END
It is fortunate that in a free society people have choices!
Some choices are better than others...
WHY do you REFUSE to read what he writes?
What a relief!
Erik,
in this project, we must use standard startup files from compiler. (mandatory for our customer) If Keil define one Macro to refresh WDT... why modify directly the code ? this method of work is better for futur upgrade of startup files. we don't have to modify the code.
i can try your idea but i don't see what is different than by macro.. macro principle is to replace keyword by some instructions. Macro is generaly defined in top of file to easily identify changeable portion of code.
but i'll try your suggestion now.
It would be if it were true. But just wait ... He'll be back with his usual 'style'!
?C_START: MOV DPTR,#?C_INITSEG Loop: MOV 0CFH,#0H ; WATCHDOG CLR A
in this project, we must use standard startup files from compiler. (mandatory for our customer) then tell you customer "we can't" and show him the silabs knowledge base articles
the issue: www.silabs.com/.../McuKB.aspx
howto: www.silabs.com/.../McuKB.aspx
so, is THAT enough to get you to do what you need to do instead of trying to do something else that you 'prefer' but does does not work
in the preview I see both links are the same you need to type watchdog into the search window that comes up and find the two articles.
PS to the sardine: if you would takr the time to verify that I was wrong (which I am not) before you spewed your bile, there woould be a whole lot less of it
if you would takr the time to verify that I was wrong (which I am not) before you spewed your bile, there woould be a whole lot less of it
Where did I say you were wrong?
The poor chap is merely trying to explain why he's doing what he's doing (following the instructions in the documentation) yet you just keep yelling at him before finally flying into a sulk and saying you're not playing any more. Sadly your sulks don't seem to last very long.
Hi, Simply, is someone able to answer why with instructions above the watchdog never reset ? A piece of code which work with c8051F500 would be cool... or INIT.A51 file which work
A piece of code which work with c8051F500 would be cool...
howto: www.silabs.com/.../McuKB.aspx you need to type watchdog into the search window that comes up and find the article
INIT.A51 file which work what is an INIT.A51 file?
what is an INIT.A51 file?
You are joking, aren't you?
Perhaps not - it would explain some of your misplaced arrogance in this thread.
Time to read the C51 manual I think...
Hi, Thx Erik for your answer but we are searching the way to reset (refresh) the watchdog during startup and init sequence (before main call). During this sequence, writing to PCA0CPH5 doesn't work and so doesn't refresh the Watchdog ! It's a little bit strange, isn't it ?
what is an INIT.A51 file? You are joking, aren't you?
Yes, there is an init file build by the tools (the one between statup and main), but if that is 'user modifiable' I do not know of it. Since it is built by the tools how can it be .a51
During this sequence, writing to PCA0CPH5 doesn't work and so doesn't refresh the Watchdog ! It's a little bit strange, isn't it ? what sequence? the issue is NOT 'refreshing' but 'disabling'
for the f12x it looks like this, you find out how to do it for your chip (hint; it is in the documents I mentioned)
STARTUP1: ; disable watchdog mov SG_WDTCN,#0DEh ; kill the puppy mov SG_WDTCN,#0ADh ; takes 2 writes
Read and learn ...
On my system (where the base directory is "C:\Keil") a file was written BY THE INSTALLER to:
C:\Keil\C51\Lib\INIT.A51
Unless you went for a very strange custom install, it is highly likely that you have a copy in the corresponding location of your system.
I have such a file in that location but it is not part of my builds.
from the file: ; INIT.A51: This code is executed, if the application program contains ; initialized variables at file level.
it is 'house standard' here not to have "initialized variables at file level" thus I have never seen it. So, yes, Mr Sardine and Mr. Bratwurst, I asked a question and finally got an answer, is that not what the forum is for (oh, sorry, you act as if it is for ridicule, not for information)
Anyhow it will do no good to kill the puppy there, it will already have bitten
Mr. Silly Sausage and Mr. Jack Sprat, I hate to take sides but this time I agree with Erik. Your latest arguments were abusive, non-technical and deliberately offensive. What were you trying to prove actually? Yes Erik made a couple of contentious claims in the past (I raised an eyebrow or two when he claimed to have "no bugs" at all) and I know he is not always right (who is, for god's sake) but seriously guys - keep it down to business, and down to earth!
Every time you build you link with that code. I would be amazed that you didn't know this if it were not for your apparently blanket refusal to read any documentation associated with software.
it is 'house standard' here not to have "initialized variables at file level"
How strange. Why would anyone impose such a rule?
I asked a question and finally got an answer, is that not what the forum is for
Yes, it is. There is also, however, an expectation that someone who has been using these tools for as long as you might have read the manual.
Anyhow it will do no good to kill the puppy there
The intent is that you strobe the watchdog in INIT.A51, not disable it.
it will already have bitten
Will it? How long does 'the watchdog' take to time out?
Hi, The issue is NOT 'refreshing' but 'disabling' If we can not refreshing the watchdog, i 'm afraid for the use of this chip...
Tamir,
It would seem that your threshold for opinionated arrogance is higher than mine.
Anyway ... I understand what you say, and will try to refrain.
I hate to take sides but this time I agree with Erik. Your latest arguments were abusive, non-technical and deliberately offensive.
First off, if you agree with Erik you will be agreeing that I treated his behaviour with ridicule. This is correct. 'Abusive' and 'offensive' are quite a different matter. I would suggest that the use of profanity would be classed as offensive, this is quite typical of Erik's behaviour on this forum. I have also noticed that you are not averse to using language that would be considered blasphemy by at least one of the major global religions.
What were you trying to prove actually? Yes Erik made a couple of contentious claims in the past
The things that irritate are his barracking arrogance, refusal to follow his own advice, refusal to read and understand what others write, inability to understand that there are alternative approaches to many problems rather than the one deemed correct by him, inability to ever follow any discussion through to its conclusion if that conclusion reveals him to be wrong and so on.
and I know he is not always right (who is, for god's sake) but seriously guys - keep it down to business, and down to earth!
I think you need to put your own house in order before you start to dictate who should say what on this forum.
I have also noticed that you are not averse to using language that would be considered blasphemy by at least one of the major global religions
I don't know if you meant it like that, but you made me laugh...if I hurt your religious feelings I apologize.
Ouch. What a punch line! Do you mean me trying to make a hit on Marleen (ops. my girl is not going to like this post hahahahaha) :-) :-) or the religious stuff?!!?!?!?
If we can not refreshing the watchdog, i 'm afraid for the use of this chip...
I'm sure you can, and INIT.A51 is one of the right places to refresh it. Unfortunately I'm not familiar with this device, and neither, it would seem, is anyone else, so I guess you're just going to have to read the datasheet carefully to establish how to do it.
View all questions in Keil forum