??? 07/26/05 21:19 Read: times |
#98222 - who's afraid of the wolf... Responding to: ???'s previous message |
I don't know how is this saying in English, but we say: if you're afraid of the wolf, don't go to the forest. Who is not aware of consequences of what s/he is doing, should not attempt to do (even less correct/repair/expand) it. Btw. what's the difference, if you have autoreloaded or even free running 16-bit counter? Where's the guarantee that your ISR won't be 65536+ (or whatever the relod value is) ticks long? Of course, nowhere; YOU (the designer/programmer) MUST be aware of the consequences of your actions. You can also try to stay at some safe grounds - but anyway, you need to know what exactly the boundaries are, and have some tool to enforce staying within them - but than you certainly have enough knowledge and tools to go for the "tricky thing", too. If you can spot possible future critical issues in your code at the time you write it, you can/should warn those who will possibly upgrade/correct your program (including yourself) in the comments - that's what they are for. Re length of the previous ISR: if it is not sel-evident from the ISRs content, one can do simply jbc ITn,Tn_ISR_shorter just before ISR end, it just reduces the allowed length of longer ISR by a few ticks. Jan Waclawek |