HI
Is there any way i can register my ISR with controller without using HWI in sysbios projects?
as in peripheral projects where i was provided with this startup file wherein i can write my ISR,
i can't find the same in sysbios .
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
Is there any way i can register my ISR with controller without using HWI in sysbios projects?
as in peripheral projects where i was provided with this startup file wherein i can write my ISR,
i can't find the same in sysbios .
Hi Shubham,
SYS/BIOS has a Hwi dispatcher which takes control of the interrupt vector table. The dispatcher will make sure the context switches (from Hwi, Task, Swi, etc) are performed correctly.
From your previous posts, I see you are using a Tiva device. If you do not want to use the dispatcher; the Hwi module supports TM4C "zero latency" interrupt on this device. To use zero latency interrupts, the peripheral interrupt must be enabled with a priority greater than disablePriority. More info in the SYS/BIOS API (ti.sysbios.family.arm.m3.Hwi).
SYSBIOS is designed to support several devices; so we do not ship a single file wherein you write the ISRs. The ISRs can be written anywhere in your code (as long as it is accessible to the particular Hwi Create).
Thanks,
Emmanuel
Hi
Thanks for reply i got ur point Sysbios won't be generic if it provides the startup file .
Just for opinion please suggest would it be fine if i blend the board specific peripheral code with sysbios code ?
except for interrupt part which cause problem because vector table in both wants to start from 0 position .
Hi Shubham,
It is common practice is to have a board file which contains the pin-muxing and peripheral power-up. Any peripheral configuration is usually done in a peripheral driver; things such as baudrates, interrupts, etc.
Have you had the opportunity to try TI-RTOS for TivaC? TI-RTOS has SYS/BIOS as its kernel. It supports several evaluation boards, provides peripheral drivers, and examples on how to use/configure them. There are also board files can be used as guides.
You can download the latest release here.
Thanks,
-- Emmanuel
Hi
Thanks for suggestion emmanuel i m indeed using the same .
i was just curious to know that should i use the hwi gate and other sysbios concept with peripheral code
likewise i m doing a case wherein i create three different task which uses ssi .And i m using gate in ssi implementation
and my ssi implementation include calls from board specific peripheral library .
so project was kinda blend between os and hardware calls . but i guess that is what we do .
Hi Shubham,
Take a look at the SPI driver for Tiva. It is a thread safe driver which already contains the blocking mechanisms for use with multiple tasks.
Thanks,
-- Emmanuel
Hi
Where can i find it ? . Can u share the it with me ?
Regards
Shubam Arora
Hi Shubam,
To use the driver in your project, you need only add it to your project configuration. To add it using the graphical configuration tool; double-click on your project's .cfg file. Right-click on the SPI module box and select "Use SPI":
If you are not using the graphical configuration tool, just add the following lines of code to your .cfg file:
var SPI = xdc.useModule('ti.drivers.SPI');
/* Can use LibType_Instrumented for debug purposes */
SPI.libType = SPI.LibType_NonInstrumented;
You can find the driver .c/.h source in the following directory:
<ti_rtos_install_dir>\packages\ti\drivers\spi\SPITivaDMA.c
Thanks,
-- Emmanuel