Forum Discussion
Altera_Forum
Honored Contributor
21 years agouCos not setting timers
uCos does not appear to explicitly set the HW timer period for its interval timer. If a boot loader changes the default timer settings for this timer, when uCos boots it will assume the defaul...
Altera_Forum
Honored Contributor
21 years ago<div class='quotetop'>QUOTE </div>
--- Quote Start --- But isn't the uCos init code assuming both that the timer is set correctly AND that it is set to the default? I was thinking these assumptions could easily be checked, or that always explicitly writing to the desired (default) value to the period registers would be OK, whether or not they really exist.[/b] --- Quote End --- Yes the uCos code is assuming that the timer is set to the default, because none of the code running before it modifies it. With embedded systems it's always a trade off of functionality and error checking against code size. Yes we could add code to check it, but we would be adding code to check for something which should not happen unless some other code has run before uCos.