06-02-2015 12:53 PM
I was looking for some guide or tutorial as to how to use the xil drivers from xilkernel.
It seems that they are more described from standalone.
What I am missing is some guidance as to how these APIs need to be called from xilkernel.
For example, the UART interrupt APIs,
1. Is the API re-entrable ?
2.Is the API thread-safe ?
It seems that such information is very relevant for xilkernel applications.
Are there any examples available ?
06-02-2015 02:59 PM
a better starting point for looking at xilkernel is to refer example design available at http://www.xilinx.com/support/documentation/sw_manuals/xilinx13_4/ug758.pdf
06-02-2015 10:00 PM
Thanks for that link. It is important starting point.
Still, I'm not sure about the issue of thread safety and reentrance of the xilinx HW driver APIs (uart, spi, gpio, i2c, etc.) .
For example, all the XUART APIs and XGPIO APIs, Do you think they can they be called from multtiple threads ?
06-02-2015 10:05 PM
06-03-2015 12:14 PM
I meant in my question Xil-drivers APIs (not malloc) such as:
ReceiveDataHandler -> calls also _UserRcvIntHandler
SendDataHandler -> calls also _UserSendIntHandler
XGPIO APIs, and many more...
Note that the question of concurrency is relevant not only for OS with thread capability, but also in standalone platform:
If we send/recv at the same time from several ports, we get that these APIs: ReceiveDataHandler , SendDataHandler can be called in concurrency. It means, as far as I understand, that both of this APIs need to be re-entrent, i.e. if any of the following use globals we can fail: ReceiveDataHandler , _UserRcvIntHandler, SendDataHandler , _UserSendIntHandler.
I'll be happy to have any comments or feedback on this issue.