- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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 default period is used, when it is not. Have not tracked down where the problem is.コピーされたリンク
3 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
The uCos port assumes that the timer is set to the period you selected in SOPC Builder, which is the value that is reflected in system.h. We cannot guarantee that the hardware has a writeable period register. None of the software which runs before MicroC/OS-II alters the period. If your bootloader is modifying the period, it should change the timer period back before loading MicroC/OS-II.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Simple enough.
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. With SOPC, the register space for the timers has the same size regardless of options, so there is no risk of accessing the wrong register. This might not be true for different HW, but init is expected to be custom anyway. I don't think you would ever want a uCos app to run at timer interval different from what it thinks it is. Robustness?- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
<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.