Hi, there.
Are there any examples or guidelines to migrate a non-OS CCS project to SYS/BIOS?
Thanks and regards,
Zhaohong
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, there.
Are there any examples or guidelines to migrate a non-OS CCS project to SYS/BIOS?
Thanks and regards,
Zhaohong
There is not a straight-forward process. What version of CCS are you using? What version of SYS/BIOS? What device?
Todd
Hi Zhaohong,
You hit the major highlights for moving to an non-OS application to TI-RTOS. Here's a few details
Interrupts
TI-RTOS manages the interrupts for you. You can create the interrupts in the .cfg or during runtime. One key thing to note is that the signature of the interrupt function changes. Do not use the "interrupt" keyword. Also the function takes a parameter ("arg"). "arg" is specified in the parameters in Hwi.create (in the .cfg) or in the Hwi_create (during runtime). Please refer to the ti.sysbios.hal.Hwi module for more details.
Clock
The TI-RTOS kernel, by default, takes one timer to drive its clock. You can tell the kernel to not use a timer and instead the application can drive the clock by calling Clock_tick. Let's assume you let the kernel own a timer. You can configure which timer it uses via the Clock timerId. You can also configure the period for that timer. The kernel allows you to plug in Clock functions that will be executed at a specified period or just once in the future. This allows the kernel timer to be essentially multiplexed. Here's an example. Assume the period of the kernel timer was 1ms. You could plug in a function that is executed every 50ms and another that executes every 60 ms. You can also schedule a one-shot clock function that will execute in 20ms. Note: all of these have to be a multiple of 1ms since the timer's period is 1ms. As noted before, you can change this period if desired. For more specific details, please refer to the ti.sysbios.knl.Clock module.
If the Clock function is not sufficent, you can still use a different timer. For instance, you need something that will run in 250microseconds. Instead of changing the kernel timer's period to 250us (and paying an extra overhead for the things the kernel does when the tick happens), you can create and use a different timer. Please refer to the ti.sysbios.hal.Timer module for more details.
Todd