MicroBlaze MCS: UART TX in Interrupt Mode (I/O Module)

I'm getting my feet wet with the MicroBlaze MCS IP Core, and I'm having trouble using the XIOModule_Send function in interrupt mode.  My assumption is that I simply don't understand how things are supposed to be hooked up - I'm hoping someone can show me what I'm doing wrong.
Below is my C code: 
#include <stdio.h>
#include "xiomodule.h"
#include "xparameters.h"
int main()
u8 msg[20] = "Buffer Text\r\n";
XIOModule io;
microblaze_enable_interrupts();
microblaze_register_handler(XIOModule_DeviceInterruptHandler, XPAR_IOMODULE_0_DEVICE_ID);
XIOModule_Initialize(&io, XPAR_IOMODULE_0_DEVICE_ID);
XIOModule_Uart_EnableInterrupt(&io);
XIOModule_Connect(&io, XIN_IOMODULE_UART_TX_INTERRUPT_INTR, (XInterruptHandler)XIOModule_Uart_InterruptHandler, &io);
XIOModule_Start(&io);
XIOModule_Send(&io, msg, 20);
xil_printf("Immediate Text\r\n");
If I understand correctly, as each byte of msg is transmitted, XIOModule_Uart_InterruptHandler should fire and call SendDataHandler, which in turn calls XIOModule_SendBuffer.  That function manages shifting the SendBuffer.NextBytePtr pointer to the next byte in the buffer, decrementing SendBuffer.RemainingBytes, and transmitting the next byte.  This process of interrupts should continue until the entire buffer (or however many bytes are specified in the XIOModule_Send call) are transmitted.
However, the output I end up with is this:
BImmediate Text
I was expecting something more like this:
BImmediate Text
uffer Text
Interestingly (to me, who admittedly doesn't fully understand how all this works), if I debug the program, and step through the code, making sure to step INTO the XIOModule_Send call, and step INTO the XIOModule_SendBuffer call, the output comes out like this:
Buffer Text
Immediate Text
If I step OVER either of those functions, my output is the same as simply letting the program execute.
I realize that I can use the XIOModule_Send function in "polled mode", essentially placing it in a loop, and using the return value of the function to see how many bytes were transmitted during the call (if any), then re-calling the function with an appropriately updated buffer pointer, and finally exiting the loop when the entire buffer is sent.  My objective, however, is to utilize the "interrupt mode", allowing the UART buffer to transmit while the micro performs other tasks (and not "blocking" it for the entire message all at once).
I'll also mention that I've made the correction to my XIOModule_Uart_InterruptHandler mentioned here.  I have written a few other pieces of test code, and can get receive interrupts to fire as expected.
Thanks for your time!

I hacked away at this for a couple of weeks, and finally got things straightened out.  The short of it is that the Xilinx drivers for the I/O Module UART aren't the most robust, and have problems that stem from three main issues:
1) The UART status register and interrupt enable/pending registers do not contain the same kind of data.  In more than one location, data from one is compared as though it came from the other.
2) UART interrupts are acknowledged before they're serviced.  This means the interrupt pending register can't be checked to see what type of UART interrupt (RX or TX) fired.
3) The UART TX interrupt fires when the UART TX buffer is emptied.  This means the UART TX buffer can't be relied on to tell what kind of UART interrupt fired.
So, on to the code...  I made changes to XIOModule_Uart_InterruptHandler and XIOModule_SendBuffer, both located in xiomodule_uart_intr.c, and things are now working basically as I would expect.  I'll quickly mention that, if anyone wishes to make similar adjustments, they should be made to the "master" source files located at \Xilinx\14.7\ISE_DS\EDK\sw\XilinxProcessorIPLib\drivers\iomodule_v1_04_a\src (assuming your version and installation are similar to mine), and then the board support package will need to be regenerated; changing the source files in an already-generated BSP won't actually do anything.  Play it safe - make backups, or just comment out the original stuff.
First off, let's pick apart the "out-of-the-box" XIOModule_Uart_InterruptHandler (this function is intended to be connected to UART RX and TX interrupts - XIN_IOMODULE_UART_RX_INTERRUPT_INTR and XIN_IOMODULE_UART_TX_INTERRUPT_INTR from xiomodule_l.h - using the XIOModule_Connect function from xiomodule.c):
void XIOModule_Uart_InterruptHandler(XIOModule *InstancePtr)
u32 IsrStatus;
Xil_AssertVoid(InstancePtr != NULL);
* Read the status register to determine which, could be both,
* interrupt is active
IsrStatus = XIOModule_ReadReg(InstancePtr->BaseAddress,
XIN_IPR_OFFSET);
if ((IsrStatus & XUL_SR_RX_FIFO_VALID_DATA) != 0) {
ReceiveDataHandler(InstancePtr);
if (((IsrStatus & XUL_SR_TX_FIFO_FULL) == XUL_SR_TX_FIFO_FULL) &&
(InstancePtr->SendBuffer.RequestedBytes > 0)) {
SendDataHandler(InstancePtr);
To begin with, the value of the interrupt pending regsiter is read and stored to the IsrStatus variable.  Bit 0 is then compared (XUL_SR_RX_FIFO_VALID_DATA = 0x0 in xiomodule_l.h) to determine whether or not a UART RX interrupt fired (bit 0 of the UART status register indicates RX valid data; it tells whether or not the UART TX buffer, which holds a single byte of data, is full).  As matthijsbos points out in his post (link in OP), this comparison doesn't accomplish anything, and always results in a false result, since IsrStatus contains data not from the UART status register, but from the interrupt pending register, bit 0 of which indicates whether or not a UART error interrupt fired.  Hence, ReceiveDataHandler is never called.  Following is his recommended correction, the function can be modified thusly:
void XIOModule_Uart_InterruptHandler(XIOModule *InstancePtr)
u32 IsrStatus;
Xil_AssertVoid(InstancePtr != NULL);
* Read the status register to determine which, could be both,
* interrupt is active
//IsrStatus = XIOModule_ReadReg(InstancePtr->BaseAddress,
// XIN_IPR_OFFSET);
IsrStatus = XIOModule_ReadReg(InstancePtr->BaseAddress,
XUL_STATUS_REG_OFFSET);
if ((IsrStatus & XUL_SR_RX_FIFO_VALID_DATA) != 0) {
ReceiveDataHandler(InstancePtr);
if (((IsrStatus & XUL_SR_TX_FIFO_FULL) == XUL_SR_TX_FIFO_FULL) &&
(InstancePtr->SendBuffer.RequestedBytes > 0)) {
SendDataHandler(InstancePtr);
The offset passed to XIOModule_ReadReg is changed from XIN_IPR_OFFSET to XUL_STATUS_REG_OFFSET (from 0x34 to 0x8, both in xiomodule_l.h), resulting in the UART status register now being read into IsrStatus (the variable name should probably have been changed for clarity, but oh well).  Consequently, an appropriate comparison is made against the value of the RX valid data bit, and UART receives now work correctly in "interrupted mode".
...however, let's continue on to look at the code handling UART TX interrupts.  The value of the TX used bit, again from the UART status register, is compared, and the value of the SendBuffer.RequestedBytes variable (inside the XIOModule struct, defined in xiomodule.h) is checked to see whether or not a UART TX interrupt has fired.  SendBuffer.RequestedBytes is set when XIOModule_Send is called by the application, and is reset to 0 by SendDataHandler after the indicated number of bytes in the referenced buffer have been placed into the UART TX buffer (both of these functions are in xiomodule_uart_intr.c).  This means it's a solid check to see if more bytes still need to be transmitted, but it's not a stand-alone indicator of whether or not a UART TX interrupt has fired, hence the coupling with the TX used bit check.  This bit tells whether or not the UART TX buffer is full (similar to the UART RX buffer, it holds only a single byte).  Unfortunately, as mentioned at the top of the post, the UART TX interrupt fires when the UART TX buffer is emptied, so when this comparison is performed, it will always return false, and SendDataHandler will never be called.  The inverse comparison can't be made, since it's possible for a UART RX interrupt to occur, and for there to be a byte of data in the UART TX buffer which simply hasn't been transmitted yet (it would also fail following transmission of the final byte of data).
As a solution, I pose the following.  XIOModule_UART_InterruptHandler is intended to be called only for UART RX and UART TX interrupts.  As written, it is intended to deal with both interrupts firing at the same time (though, for the above reasons, it doesn't actually work) with default interrupt servicing (only the highest priority interrupt will be serviced - to set otherwise, XIOModule_SetOptions from xiomodule_options.c would need to be called passing XIN_SVC_ALL_ISRS_OPTION from xiomodule.h).  The likelkihood of both interrupts occurring "simultaneously" (within the same microprocessor clock cycle) is remote, and thus I claim only a single comparison is necessary to determine which of the two interrupts fired:
void XIOModule_Uart_InterruptHandler(XIOModule *InstancePtr)
u32 IsrStatus;
Xil_AssertVoid(InstancePtr != NULL);
* Read the status register to determine which, could be both,
* interrupt is active
//IsrStatus = XIOModule_ReadReg(InstancePtr->BaseAddress,
// XIN_IPR_OFFSET);
IsrStatus = XIOModule_ReadReg(InstancePtr->BaseAddress,
XUL_STATUS_REG_OFFSET);
//if ((IsrStatus & XUL_SR_RX_FIFO_VALID_DATA) != 0) {
// ReceiveDataHandler(InstancePtr);
//if (((IsrStatus & XUL_SR_TX_FIFO_FULL) == XUL_SR_TX_FIFO_FULL) &&
// (InstancePtr->SendBuffer.RequestedBytes > 0)) {
// SendDataHandler(InstancePtr);
if ((IsrStatus & XUL_SR_RX_FIFO_VALID_DATA) != 0)
ReceiveDataHandler(InstancePtr);
else
SendDataHandler(InstancePtr);
In my version of the function, only the UART RX receive buffer is checked to determine which of the interrupts fired.  Since XIOModule_Uart_InterruptHandler will ONLY be called when either a UART RX or UART TX interrupt fires, neither of the appropriate handlers will be called erroneously.  There is only the (extremely) small chance that both interrupts will fire within the same microprocessor clock cycle, in which case only ReceiveDataHandler will be called, resulting in only the UART RX interrupt being appropriately serviced.
...yet this still doesn't completely get "interrupted mode" UART transmits working.  Let's now take a look at the unedited version of XIOModule_SendBuffer:
unsigned int XIOModule_SendBuffer(XIOModule *InstancePtr)
unsigned int SentCount = 0;
u8 StatusRegister;
u8 IntrEnableStatus;
* Read the status register to determine if the transmitter is full
StatusRegister = XIOModule_GetStatusReg(InstancePtr->BaseAddress);
* Enter a critical region by disabling all the UART interrupts to allow
* this call to stop a previous operation that may be interrupt driven
XIomodule_Out32(InstancePtr->BaseAddress + XIN_IER_OFFSET,
StatusRegister & 0xFFFFFFF8);
* Save the status register contents to restore the interrupt enable
* register to it's previous value when that the critical region is
* exited
IntrEnableStatus = StatusRegister;
* Fill the FIFO from the the buffer that was specified
while (((StatusRegister & XUL_SR_TX_FIFO_FULL) == 0) &&
(SentCount < InstancePtr->SendBuffer.RemainingBytes)) {
XIOModule_WriteReg(InstancePtr->BaseAddress,
XUL_TX_OFFSET,
InstancePtr->SendBuffer.NextBytePtr[
SentCount]);
SentCount++;
StatusRegister =
XIOModule_GetStatusReg(InstancePtr->BaseAddress);
* Update the buffer to reflect the bytes that were sent from it
InstancePtr->SendBuffer.NextBytePtr += SentCount;
InstancePtr->SendBuffer.RemainingBytes -= SentCount;
* Increment associated counters
InstancePtr->Uart_Stats.CharactersTransmitted += SentCount;
* Restore the interrupt enable register to it's previous value such
* that the critical region is exited
XIomodule_Out32(InstancePtr->BaseAddress + XIN_IER_OFFSET,
(InstancePtr->CurrentIER & 0xFFFFFFF8) | (IntrEnableStatus & 0x7));
* Return the number of bytes that were sent, althought they really were
* only put into the FIFO, not completely sent yet
return SentCount;
First, XIOModule_GetStatusReg (from xiomodule_l.h) is called to retreive the value of the UART status register.  This value is then apparently used with a bit mask to disable any enabled UART interrupts.  Unfortunately, this is another case of comparing dissimilar data from two different registers.  Further complicating matters, the contents of the interrupt enable register can't be read as an alternative (an attempt to read any of the constituent bits will return a 0, even if the associated interrupt is truly enabled).  Continuing, the value of the UART status register is again checked to ensure the UART TX buffer is empty, appropriate variables in the XIOModule struct are checked to see how many bytes still need to be transmitted, and the address of the next byte to place into the UART TX buffer is used to do just that.  After send counts are updated, the value of the UART status register is again erroneously used in an attempt to re-enable any UART interrupts that had been disabled earlier in the function.
My corrections instead rely on the value of the CurrentIER ("current interrupt enable register") variable in the XIOModule struct, which is appriopriately updated by other functions as interrupts are modified, to correctly disable and enable UART interrupts:
unsigned int XIOModule_SendBuffer(XIOModule *InstancePtr)
unsigned int SentCount = 0;
u8 StatusRegister;
u8 IntrEnableStatus;
* Read the status register to determine if the transmitter is full
StatusRegister = XIOModule_GetStatusReg(InstancePtr->BaseAddress);
* Enter a critical region by disabling all the UART interrupts to allow
* this call to stop a previous operation that may be interrupt driven
//XIomodule_Out32(InstancePtr->BaseAddress + XIN_IER_OFFSET,
// StatusRegister & 0xFFFFFFF8);
* Save the status register contents to restore the interrupt enable
* register to it's previous value when that the critical region is
* exited
//IntrEnableStatus = StatusRegister;
XIomodule_Out32(InstancePtr->BaseAddress + XIN_IER_OFFSET, InstancePtr->CurrentIER & 0xFFFFFFF8);
* Fill the FIFO from the the buffer that was specified
while (((StatusRegister & XUL_SR_TX_FIFO_FULL) == 0) &&
(SentCount < InstancePtr->SendBuffer.RemainingBytes)) {
XIOModule_WriteReg(InstancePtr->BaseAddress,
XUL_TX_OFFSET,
InstancePtr->SendBuffer.NextBytePtr[
SentCount]);
SentCount++;
StatusRegister =
XIOModule_GetStatusReg(InstancePtr->BaseAddress);
* Update the buffer to reflect the bytes that were sent from it
InstancePtr->SendBuffer.NextBytePtr += SentCount;
InstancePtr->SendBuffer.RemainingBytes -= SentCount;
* Increment associated counters
InstancePtr->Uart_Stats.CharactersTransmitted += SentCount;
* Restore the interrupt enable register to it's previous value such
* that the critical region is exited
//XIomodule_Out32(InstancePtr->BaseAddress + XIN_IER_OFFSET,
// (InstancePtr->CurrentIER & 0xFFFFFFF8) | (IntrEnableStatus & 0x7));
XIomodule_Out32(InstancePtr->BaseAddress + XIN_IER_OFFSET, InstancePtr->CurrentIER & 0xFFFFFFFF);
* Return the number of bytes that were sent, althought they really were
* only put into the FIFO, not completely sent yet
return SentCount;
With both of these functions modified as I have above, UART transmits work as I would expect them to in "interrupted mode".  Once a byte is placed into the UART TX buffer, execution returns to the primary application.  When the UART TX buffer clears, a UART TX interrupt fires, the next byte is placed into the UART TX buffer, and execution again returns to the primary application.  This continues until all indicated bytes are transmitted, and then the application provided send data handler is called (set with XIOModule_SetSendHandler in xiomodule_uart_intr.c).  A good pracitce for this handler would be to immediately disable/disconnect UART TX interrupts in order to avoid complications and unintended results.  It's worth mentioning that attempting to interject non-interrupted mode UART transmits (say, for instance, using xil_printf) in the middle of an interrputed mode transmit will produce very unpredictable results.
That all being said...  I would wager that many of those using an embedded MicroBlaze controller for its UART functionality are probably doing so while their VHDL is doing all the "heavy lifting", and the gains made by utilizing "interrupted mode" transmits would be marginal.
 

Similar Messages

  • MicroC-OS-II running on Microblaze with UARTLITE in interrupt mode not working

    Hello, 
    I am trying to write and application that uses the MicroBlaze which runs the MicroC-OS-II. I am also trying to use the UARTLITE in interrupt mode. 
    Currently I can use the UARTLITE in interrrupt mode if I run a standalone package that is without MicroC-OS-II.m
    I read the documentation attached see page 22 (Handling Interrupts). On how the OS handles interrupts but I am little confused on how to setup the UARTLITE in interrrupt mode to work with the OS.
    I know that OS_CPU_ISR() handles the interrupt but how do I make it so that it handles the uartlite interrupt. 
    I am really confused how I should modify the UARTLITE interrupt code below to work with MICROC/OS. As really confused I MEAN I JUST DON"T understand. 
    * (c) Copyright 2002-2013 Xilinx, Inc. All rights reserved.
    * This file contains confidential and proprietary information of Xilinx, Inc.
    * and is protected under U.S. and international copyright and other
    * intellectual property laws.
    * DISCLAIMER
    * This disclaimer is not a license and does not grant any rights to the
    * materials distributed herewith. Except as otherwise provided in a valid
    * license issued to you by Xilinx, and to the maximum extent permitted by
    * applicable law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND WITH ALL
    * FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS,
    * IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
    * MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE;
    * and (2) Xilinx shall not be liable (whether in contract or tort, including
    * negligence, or under any other theory of liability) for any loss or damage
    * of any kind or nature related to, arising under or in connection with these
    * materials, including for any direct, or any indirect, special, incidental,
    * or consequential loss or damage (including loss of data, profits, goodwill,
    * or any type of loss or damage suffered as a result of any action brought by
    * a third party) even if such damage or loss was reasonably foreseeable or
    * Xilinx had been advised of the possibility of the same.
    * CRITICAL APPLICATIONS
    * Xilinx products are not designed or intended to be fail-safe, or for use in
    * any application requiring fail-safe performance, such as life-support or
    * safety devices or systems, Class III medical devices, nuclear facilities,
    * applications related to the deployment of airbags, or any other applications
    * that could lead to death, personal injury, or severe property or
    * environmental damage (individually and collectively, "Critical
    * Applications"). Customer assumes the sole risk and liability of any use of
    * Xilinx products in Critical Applications, subject only to applicable laws
    * and regulations governing limitations on product liability.
    * THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS PART OF THIS FILE
    * AT ALL TIMES.
    * @file xuartlite_intr_example.c
    * This file contains a design example using the UartLite driver (XUartLite) and
    * hardware device using the interrupt mode.
    * @note
    * The user must provide a physical loopback such that data which is
    * transmitted will be received.
    * MODIFICATION HISTORY:
    * <pre>
    * Ver Who Date Changes
    * 1.00a jhl 02/13/02 First release
    * 1.00b rpm 10/01/03 Made XIntc declaration global
    * 1.00b sv 06/09/05 Minor changes to comply to Doxygen and coding guidelines
    * 2.00a ktn 10/20/09 Updated to use HAL Processor APIs and minor changes
    * for coding guidelnes.
    * </pre>
    /***************************** Include Files *********************************/
    #include "xparameters.h"
    #include "xuartlite.h"
    #include "xintc.h"
    #include "xil_exception.h"
    /************************** Constant Definitions *****************************/
    * The following constants map to the XPAR parameters created in the
    * xparameters.h file. They are defined here such that a user can easily
    * change all the needed parameters in one place.
    #define UARTLITE_DEVICE_ID XPAR_UARTLITE_2_DEVICE_ID
    #define INTC_DEVICE_ID XPAR_INTC_0_DEVICE_ID
    #define UARTLITE_INT_IRQ_ID XPAR_INTC_0_UARTLITE_2_VEC_ID
    * The following constant controls the length of the buffers to be sent
    * and received with the UartLite device.
    #define TEST_BUFFER_SIZE 100
    /**************************** Type Definitions *******************************/
    /***************** Macros (Inline Functions) Definitions *********************/
    /************************** Function Prototypes ******************************/
    int UartLiteIntrExample(u16 DeviceId);
    int SetupInterruptSystem(XUartLite *UartLitePtr);
    void SendHandler(void *CallBackRef, unsigned int EventData);
    void RecvHandler(void *CallBackRef, unsigned int EventData);
    /************************** Variable Definitions *****************************/
    XUartLite UartLite; /* The instance of the UartLite Device */
    XIntc InterruptController; /* The instance of the Interrupt Controller */
    * The following variables are shared between non-interrupt processing and
    * interrupt processing such that they must be global.
    * The following buffers are used in this example to send and receive data
    * with the UartLite.
    u8 SendBuffer[TEST_BUFFER_SIZE];
    u8 ReceiveBuffer[TEST_BUFFER_SIZE];
    * The following counters are used to determine when the entire buffer has
    * been sent and received.
    static volatile int TotalReceivedCount;
    static volatile int TotalSentCount;
    * Main function to call the UartLite interrupt example.
    * @param None
    * @return XST_SUCCESS if successful, XST_FAILURE if unsuccessful
    * @note None
    int main(void)
    int Status;
    xil_printf("Started\n");
    * Run the UartLite Interrupt example, specify the Device ID that is
    * generated in xparameters.h.
    Status = UartLiteIntrExample(UARTLITE_DEVICE_ID);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    return XST_SUCCESS;
    * This function does a minimal test on the UartLite device and driver as a
    * design example. The purpose of this function is to illustrate
    * how to use the XUartLite component.
    * This function sends data and expects to receive the same data through the
    * UartLite. The user must provide a physical loopback such that data which is
    * transmitted will be received.
    * This function uses interrupt driver mode of the UartLite device. The calls
    * to the UartLite driver in the handlers should only use the non-blocking
    * calls.
    * @param DeviceId is the Device ID of the UartLite Device and is the
    * XPAR_<uartlite_instance>_DEVICE_ID value from xparameters.h.
    * @return XST_SUCCESS if successful, otherwise XST_FAILURE.
    * @note
    * This function contains an infinite loop such that if interrupts are not
    * working it may never return.
    int UartLiteIntrExample(u16 DeviceId)
    int Status;
    int Index;
    * Initialize the UartLite driver so that it's ready to use.
    Status = XUartLite_Initialize(&UartLite, DeviceId);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Perform a self-test to ensure that the hardware was built correctly.
    Status = XUartLite_SelfTest(&UartLite);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Connect the UartLite to the interrupt subsystem such that interrupts can
    * occur. This function is application specific.
    Status = SetupInterruptSystem(&UartLite);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Setup the handlers for the UartLite that will be called from the
    * interrupt context when data has been sent and received, specify a
    * pointer to the UartLite driver instance as the callback reference so
    * that the handlers are able to access the instance data.
    XUartLite_SetSendHandler(&UartLite, SendHandler, &UartLite);
    XUartLite_SetRecvHandler(&UartLite, RecvHandler, &UartLite);
    * Enable the interrupt of the UartLite so that interrupts will occur.
    XUartLite_EnableInterrupt(&UartLite);
    * Initialize the send buffer bytes with a pattern to send and the
    * the receive buffer bytes to zero to allow the receive data to be
    * verified.
    for (Index = 0; Index < TEST_BUFFER_SIZE; Index++) {
    SendBuffer[Index] = Index;
    ReceiveBuffer[Index] = 0;
    * Start receiving data before sending it since there is a loopback.
    XUartLite_Recv(&UartLite, ReceiveBuffer, TEST_BUFFER_SIZE);
    * Send the buffer using the UartLite.
    XUartLite_Send(&UartLite, SendBuffer, TEST_BUFFER_SIZE);
    * Wait for the entire buffer to be received, letting the interrupt
    * processing work in the background, this function may get locked
    * up in this loop if the interrupts are not working correctly.
    while ((TotalReceivedCount != TEST_BUFFER_SIZE) ||
    (TotalSentCount != TEST_BUFFER_SIZE)) {
    for (Index = 0; Index < TEST_BUFFER_SIZE; Index++)
    xil_printf("%d",ReceiveBuffer[Index]);
    * Verify the entire receive buffer was successfully received.
    for (Index = 0; Index < TEST_BUFFER_SIZE; Index++) {
    if (ReceiveBuffer[Index] != SendBuffer[Index]) {
    return XST_FAILURE;
    return XST_SUCCESS;
    * This function is the handler which performs processing to send data to the
    * UartLite. It is called from an interrupt context such that the amount of
    * processing performed should be minimized. It is called when the transmit
    * FIFO of the UartLite is empty and more data can be sent through the UartLite.
    * This handler provides an example of how to handle data for the UartLite,
    * but is application specific.
    * @param CallBackRef contains a callback reference from the driver.
    * In this case it is the instance pointer for the UartLite driver.
    * @param EventData contains the number of bytes sent or received for sent
    * and receive events.
    * @return None.
    * @note None.
    void SendHandler(void *CallBackRef, unsigned int EventData)
    TotalSentCount = EventData;
    * This function is the handler which performs processing to receive data from
    * the UartLite. It is called from an interrupt context such that the amount of
    * processing performed should be minimized. It is called data is present in
    * the receive FIFO of the UartLite such that the data can be retrieved from
    * the UartLite. The size of the data present in the FIFO is not known when
    * this function is called.
    * This handler provides an example of how to handle data for the UartLite,
    * but is application specific.
    * @param CallBackRef contains a callback reference from the driver, in
    * this case it is the instance pointer for the UartLite driver.
    * @param EventData contains the number of bytes sent or received for sent
    * and receive events.
    * @return None.
    * @note None.
    void RecvHandler(void *CallBackRef, unsigned int EventData)
    TotalReceivedCount = EventData;
    * This function setups the interrupt system such that interrupts can occur
    * for the UartLite device. This function is application specific since the
    * actual system may or may not have an interrupt controller. The UartLite
    * could be directly connected to a processor without an interrupt controller.
    * The user should modify this function to fit the application.
    * @param UartLitePtr contains a pointer to the instance of the UartLite
    * component which is going to be connected to the interrupt
    * controller.
    * @return XST_SUCCESS if successful, otherwise XST_FAILURE.
    * @note None.
    int SetupInterruptSystem(XUartLite *UartLitePtr)
    int Status;
    * Initialize the interrupt controller driver so that it is ready to
    * use.
    Status = XIntc_Initialize(&InterruptController, INTC_DEVICE_ID);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Connect a device driver handler that will be called when an interrupt
    * for the device occurs, the device driver handler performs the
    * specific interrupt processing for the device.
    Status = XIntc_Connect(&InterruptController, UARTLITE_INT_IRQ_ID,
    (XInterruptHandler)XUartLite_InterruptHandler,
    (void *)UartLitePtr);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Start the interrupt controller such that interrupts are enabled for
    * all devices that cause interrupts, specific real mode so that
    * the UartLite can cause interrupts through the interrupt controller.
    Status = XIntc_Start(&InterruptController, XIN_REAL_MODE);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Enable the interrupt for the UartLite device.
    XIntc_Enable(&InterruptController, UARTLITE_INT_IRQ_ID);
    * Initialize the exception table.
    Xil_ExceptionInit();
    * Register the interrupt controller handler with the exception table.
    Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
    (Xil_ExceptionHandler)XIntc_InterruptHandler,
    &InterruptController);
    * Enable exceptions.
    Xil_ExceptionEnable();
    return XST_SUCCESS;
     

    Hello,
    I have a KC705 board, with Microblaze on it. My software is Witten above the operating system of µC/OS-II.I am trying to write multi task ie. task1 and task2.  Application that uses the MicroBlaze which runs the MicroC-OS-II.
    I am using  the UARTLITE able to run hello world program successfully is with MicroC-OS-II.I read the documentations,  On how the OS handles multi task, but I am little confused on how to implement..(i am new to RTOS). Please suggest  me or share the any documents, any example codes.
    ~thanks
    ASHIOK H

  • MicroBlaze MCS General Purpose Input (GPI1_Interrupt)

    So I have generated a MicroBlaze MCS v1.2 Core and I enabled General Purpose Interrupt 1 (32-bits) and I checked the box for "GPI Interrupt".
    Now the "GPI Interrupt" is set as an output node, while the GPI1 is set up as an interrupt.
    I have searched all over the Xilinx documentation and this forum, and I cannot determine the answer to the following:
    What and when does GPI1_Interrupt trigger? And why is it an output signal and not an input signal?
    Here is a copy of the entity of my core:
    entity microblaze_mcs_core is
    port (
    Clk : in STD_LOGIC := 'X';
    Reset : in STD_LOGIC := 'X';
    INTC_IRQ : out STD_LOGIC;
    GPI1_Interrupt : out STD_LOGIC;
    GPI2_Interrupt : out STD_LOGIC;
    GPO1 : out STD_LOGIC_VECTOR ( 31 downto 0 );
    GPO2 : out STD_LOGIC_VECTOR ( 31 downto 0 );
    GPI1 : in STD_LOGIC_VECTOR ( 31 downto 0 );
    GPI2 : in STD_LOGIC_VECTOR ( 31 downto 0 )
    end microblaze_mcs_core;
    I am basically trying to figure out what is the best way to transfer data to and from my MicroBlaze core.  Please note that I am using this core from LabVIEW FPGA, so any logic I use will have to be implemented by me! 

    Duplicate post. Look here.
    Regards,
    Chris Delvizis
    National Instruments

  • Xps SPI with interrupt mode

    Hi everyone;
    I am building XPS SPI in PowerPC embedded system constructed in Virtex 4 ML403 board.
    Now i am writing two programs, the first one is built using an interrupt mode, but the second one is built by a normal mode.
    Both software sent the data -what i need- in a proper way, but the problem exist in interupt mode such that: the program stop, after transfer the data using XSpi_Transfer function, and the program doesn't return from this function.
    How can i solve this issue?
    My software code (using interrupt mode):
    * Xilinx, Inc.
    * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
    * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
    * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR
    * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION
    * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE
    * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION
    * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
    * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO
    * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE
    * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY
    * AND FITNESS FOR A PARTICULAR PURPOSE.
    * Xilinx EDK 10.1.03 EDK_K_SP3.6
    * This file is a sample test application
    * This application is intended to test and/or illustrate some
    * functionality of your system. The contents of this file may
    * vary depending on the IP in your system and may use existing
    * IP driver functions. These drivers will be generated in your
    * XPS project when you run the "Generate Libraries" menu item
    * in XPS.
    * Your XPS project directory is at:
    // Located in: ppc405_0/include/xparameters.h
    #include "xparameters.h"
    #include "xcache_l.h"
    #include "xspi.h" /* SPI device driver */
    #include "stdio.h"
    #include "xutil.h"
    #include "xintc.h" /* Interrupt controller device driver */
    #include "xbasic_types.h"
    #ifdef __MICROBLAZE__
    #include "mb_interface.h"
    #endif
    #ifdef __PPC__
    #include "xexception_l.h"
    #endif
    /************************** Constant Definitions *****************************/
    * The following constants map to the XPAR parameters created in the
    * xparameters.h file. They are defined here such that a user can easily
    * change all the needed parameters in one place.
    #define SPI_DEVICE_ID XPAR_SPI_0_DEVICE_ID
    #define INTC_DEVICE_ID XPAR_INTC_0_DEVICE_ID
    #define SPI_INTR_ID XPAR_INTC_0_SPI_0_VEC_ID
    /************************** Variable Definitions *****************************/
    * The instances to support the device drivers are global such that the
    * are initialized to zero each time the program runs. They could be local
    * but should at least be static so they are zeroed.
    XSpi Spi;
    XIntc InterruptController;
    * The following variable tracks any errors that occur during interrupt
    * processing
    int Error;
    volatile int TransferInProgress;
    /***************** Macros (Inline Functions) Definitions *********************/
    /************************** Function Prototypes ******************************/
    static int SetupInterruptSystem(XSpi *SpiPtr);
    void SpiHandler(void *CallBackRef, Xuint32 StatusEvent, unsigned int ByteCount);
    int main (void)
    int Status;
    u8 *BufferPtr;
    u8 UniqueValue;
    int Count;
    Xuint8 *SendBufPrt;
    int DelayCount = 0;
    XCache_EnableICache(0x80000001);
    XCache_EnableDCache(0x80000001);
    print("-- Entering main() --\r\n");
    * MemoryTest routine will not be run for the memory at
    * 0xffffe000 (xps_bram_if_cntlr_1)
    * because it is being used to hold a part of this application program
    * Initialize the SPI driver so that it's ready to use,
    * specify the device ID that is generated in xparameters.h
    Status = XSpi_Initialize(&Spi, SPI_DEVICE_ID);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Connect the SPI driver to the interrupt subsystem such that
    * interrupts can occur. This function is application specific.
    Status = SetupInterruptSystem(&Spi);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Setup the handler for the SPI that will be called from the interrupt
    * context when an SPI status occurs, specify a pointer to the SPI
    * driver instance as the callback reference so the handler is able to
    * access the instance data
    XSpi_SetStatusHandler(&Spi, &Spi, (XSpi_StatusHandler)SpiHandler);
    * Set the SPI device as a master and in manual slave select mode such
    * that the slave select signal does not toggle for every byte of a
    * transfer, this must be done before the slave select is set
    Status = XSpi_SetOptions(&Spi, XSP_MASTER_OPTION);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Select the slave on the SPI bus, so that it can be
    * read and written using the SPI bus
    Status = XSpi_SetSlaveSelect(&Spi, 0x01);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Start the SPI driver so that interrupts and the device are enabled
    XSpi_Start(&Spi);
    * Send the Write Disable cmd, and length of the packet to the EEPROM to be
    * written, no receive buffer is specified since there is nothing to
    * receive
    TransferInProgress = TRUE;
    *SendBufPrt = 0xDA;
    *(SendBufPrt + 1) = 0xAA;
    *(SendBufPrt + 2) = 0x14;
    *(SendBufPrt + 3) = 0x32;
    XSpi_Transfer(&Spi, SendBufPrt, NULL, 4);
    xil_printf("infinte loop");
    while (TransferInProgress);
    * MemoryTest routine will not be run for the memory at
    * 0x00000000 (DDR_SDRAM)
    * because it is being used to hold a part of this application program
    print("-- Exiting main() --\r\n");
    XCache_DisableDCache();
    XCache_DisableICache();
    return 0;
    * This function is the handler which performs processing for the SPI driver.
    * It is called from an interrupt context such that the amount of processing
    * performed should be minimized. It is called when a transfer of SPI data
    * completes or an error occurs.
    * This handler provides an example of how to handle SPI interrupts
    * but is application specific.
    * @param CallBackRef is a reference passed to the handler.
    * @param StatusEvent is the status of the SPI .
    * @param ByteCount is the number of bytes transferred.
    * @return None
    * @note None.
    void SpiHandler(void *CallBackRef, Xuint32 StatusEvent, unsigned int ByteCount)
    * Indicate the transfer on the SPI bus is no longer in progress
    * regardless of the status event
    TransferInProgress = FALSE;
    * If the event was not transfer done, then track it as an error
    if (StatusEvent != XST_SPI_TRANSFER_DONE) {
    Error++;
    * This function setups the interrupt system such that interrupts can occur
    * for the SPI driver. This function is application specific since the actual
    * system may or may not have an interrupt controller. The SPI device could
    * be directly connected to a processor without an interrupt controller. The
    * user should modify this function to fit the application.
    * @param SpiPtr contains a pointer to the instance of the XSpi component
    * which is going to be connected to the interrupt controller.
    * @return XST_SUCCESS if successful else XST_FAILURE.
    * @note None.
    static int SetupInterruptSystem(XSpi *SpiPtr)
    int Status;
    * Initialize the interrupt controller driver so that
    * it's ready to use, specify the device ID that is generated in
    * xparameters.h
    Status = XIntc_Initialize(&InterruptController, INTC_DEVICE_ID);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Connect a device driver handler that will be called when an interrupt
    * for the device occurs, the device driver handler performs the
    * specific interrupt processing for the device
    Status = XIntc_Connect(&InterruptController,
    SPI_INTR_ID,
    (XInterruptHandler)XSpi_InterruptHandler,
    (void *)SpiPtr);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Start the interrupt controller such that interrupts are enabled for
    * all devices that cause interrupts, specific real mode so that
    * the SPI can cause interrupts thru the interrupt controller.
    Status = XIntc_Start(&InterruptController, XIN_REAL_MODE);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    * Enable the interrupt for the Spi device
    XIntc_Enable(&InterruptController, SPI_INTR_ID);
    #ifdef __PPC__
    * Initialize the PPC405 exception table
    XExc_Init();
    * Register the interrupt controller handler with the exception table
    XExc_RegisterHandler(XEXC_ID_NON_CRITICAL_INT,
    (XExceptionHandler)XIntc_InterruptHandler,
    &InterruptController);
    * Enable non-critical exceptions
    XExc_mEnableExceptions(XEXC_NON_CRITICAL);
    #endif
    #ifdef __MICROBLAZE__
    * Enable the Microblaze Interrupts.
    microblaze_enable_interrupts();
    #endif
    return XST_SUCCESS;
    Thank you in advanced

    Hi,
    Check if the XSpi_Transfer function fails at the assert statements at beggining. Your SendBufferptr is not initialized to any value.you can try something like
    Xuint8 SendBufPrt[4];
    Xuint8 *ptr = &SendBufPrt;
    and pass ptr to XSpi_Transfer . 
     

  • What is the penalty in interrupt mode?

    I am very interested in knowing the limitations of interrupt mode for my application. I will use a 4472 and I need max sampling rate (100 KS/s each channel), connected to a 6034 (1 channel 100 KHz) with RTSI. I will use pre-trigger mode. Will interrupt mode support this?
    I need interrupt mode because i need to know when the trigger arrives in order to "more or less" sinchronize with some devices not from national

    Ignacio;
    I'm assuming you are interested on configuring the data transfer of your data acquisition devices to be interrupt based.
    If that is the case, the data transfer performance will drop in relation to the DMA based data transfer. Furthermore, the data transfer will be system dependent, meaning that the maximum transfer rate will be determine by how fast your machine handles the interrupts.
    The only limitation is the sample rate of your acquisition. In case you set the data transfer to be interrupt based, you will probably need to drop the sample rate in order the on board FIFO not to be overflowed.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Bootup switched to interrupt mode ???

    I have been using Archlinux for a while without problems, however today when I started the machine it seemed to freeze (blank screen rather than the bootup info)  If I press the power key it then continues with normal bootup text displayed.  Then at a few times i have to press <ENTER> to get the steps to continue?
    The boot log reads :
    acpi: EC: non-query interrupt received, switching to interrupt mode
    just as it stops for the first time, after pressing <POWER> it moves on
    another note: when boot gets to Starting Hardware Abstraction Layer it displays [Busy].  If I press <ENTER> it then moves on again.
    What seems to be wrong?
    thanks
    Last edited by glenn69 (2008-08-19 15:32:28)

    I have the same issue! http://bbs.archlinux.org/viewtopic.php?id=53521

  • Interrupts mode failure for counters on 6624

    Hi everyone, 
    I'm facing a problem with a counter board PCI-6624.
    I have 5 flowmeters inputs in quadrature.
    3 of them are in DMA and 2 in Interrupts mode for the edge count DAQmx read function. (6624 doesn't allow more DAM channels, and I cannot use multichannel task for counters)
    After a while, we have the interrupts channels freezing and sending the last acquired data, but no error is displayed. The other channels are still working well.
    I have tried to change the position of my DMA and Interrupts channels. It is always the Interrupts channels that freeze.
    DAQmx v9.8
    LV 2010
    Do you have any idea or a solution.
    Kind regards to all the NI community.

    I don't want to keep it on all the time because it's bad for it but I have no other option.
    I keep my computer on all the time, the power is draws is negligible, and you would avoid all the problems you are having. I also do not have it set to reboot after a power failure.
    You can try resetting the SMU to see if that helps with your situation, powering it on all the time, will certainly not hurt it.

  • Sending out a signal via Parallel port in interrupt mode?

    I am trying to send out a 5KHz TTL signal via parallel port. the CPU should be disturbed at most time. so we can't use loop structure. I guess I have to use interrupt mode to do this job.
    In other languages, we might be able to programm 8253, which is a timer and counter chip on mother board. can we generate a 5KHz siganl via parallel port without disturbing CPU?
    or can we call another labview program in our main labview program.by doing so, two programs are running at the same time, we may be able to solve my problem
    Thanks

    Hi Sean-
    This functionality is theoretically possible, but this might not be the best option if you are concerned about latency in operation. A few references for using the parallel port in LabVIEW are linked in this thread.
    If you are concerned about precise timing and operating system latency issues, you may want to consider a hardware-timed PCI counter/timer board instead. This utility is a good starting point for selecting such a card.
    Tom W
    National Instruments

  • MicroBlaze MCS GPO write issues

    I'm using the Microblaze MCS with the XIOModule_DiscreteSet, and XIOModule_DiscreteClear functions to manipulate the GPO busses. For example here is how I use the function:
    XIOModule_DiscreteSet(&gpo, 1, (1 << 4)); //Turn on bit 4 of GPO1.
    Now the problem im having is if I use DiscreteSet or Clear in different functions each time I use a new function it completely resets the whole GPO bus.... This seems like a bug to me, but maybe Im doing something wrong?
    Here is an example of what I'm talking about:
    Lets say I call "XIOModule_DiscreteSet" in fuction "foo". I set bits 3 and 4 of the gpo. After foo ends and the program procedes to the next fuction "bar" and I again use "XIOModule_DiscreteSet" to set bits 5 and 6. But as soon as I try to get bit 5, it clears bits 3 and 4....
    Some other info: I have GPO declared as a global variable and the first thing I do in main is "XIOModule_Initialize(&gpo, XPAR_IOMODULE_0_DEVICE_ID);" Before I didnt have the GPO declared globally I just delared a new instance of GPO and re-initalized it in every function but I still saw this exact behavior

    Hi,
    In my opinion, this is probably not Windows GPO problem. To confirm the suppose, you can follow the path below to check GPO settings if there is any change after the software installed.
    Computer Configuration\Administrative Templates\System\Removable Storage Access
    User Configuration\Administrative Templates\System\Removable Storage Access
    These two policy manage system and current user Removable Storage access.
    If there is no change with these policy, it would be better to contact the manufacture of the driver for further assistance.
    Roger Lu
    TechNet Community Support

  • How to identify update mode in function module for generic extractor

    Hi All,
    I have created generic extractor using function module which supports delta load.
    Delta logic is handeled in coding...by using ROOSGENDLM table.
    Now problem is we need to identify the update mode, requested from infopackage in our function module in order to apply logic for Repair full.
    I would like to know table or parameter in source system, which contain the update mode (Init , Delta , Full).
    Thanks,
    Niraj

    Hi Niraj
    You can use the FM import parameter "i_updmode" (This is of type "SBIWA_S_INTERFACE-UPDMODE") to determine if infopackage triggerred in full or delta mode.
    I_REQUNR     TYPE     SBIWA_S_INTERFACE-REQUNR                                                                               
    I_ISOURCE     TYPE     SBIWA_S_INTERFACE-ISOURCE                               InfoSource Name
    I_MAXSIZE     TYPE     SBIWA_S_INTERFACE-MAXSIZE                               Data Packet size
    I_INITFLAG     TYPE     SBIWA_S_INTERFACE-INITFLAG                               Initial Flag
    I_UPDMODE     TYPE     SBIWA_S_INTERFACE-UPDMODE                               Update Mode
    I_DATAPAKID     TYPE     SBIWA_S_INTERFACE-DATAPAKID                               Datapacket Id
    I_PRIVATE_MODE                                                                               
    I_CALLMODE     TYPE     ROARCHD200-CALLMODE                               Single-Character Flag
    I_REMOTE_CALL     TYPE     SBIWA_FLAG                                                                               
    Cheers
    Vasu Sattenapalli

  • KFF(KeyFlex Field) Issue in Query Mode in GL Module

    HI all
    i have developed a custom form in GL, i am facing some problem the KFF attached.
    In the query mode when i do ctlr+L on the KFF attached field, i am getting the following standard note
    " APP-FND-01345:List of values is not available for this field while in Enter-Query Mode"
    Any point on this issue.
    Regards
    Anand

    I assume you are working with Oracle Apps.
    We have a special section of different forums under the E-Business Suite category, you'll get more help there for Oracle Apps issues, this is the Forms Forum.
    Tony

  • Update Mode of Function Module

    Hi all,
         The detailed knowledge of SAP techniques is so much ........
    Nowadays I encountered one,which is the 'Update Mode' attribute of a function module.when we create
    a function ,we will find the attribute is set as 'Start Immed' by default. But actualy I don't know the meaning
    of this attribute. According to some material info.,I learnt that it can be classified into two:v1 & v2.
         Would you tell me the true meaning of 'Update MOde' and the distinction between V1 and V2.
        Thanks a lot.

    Hi
    V1 modules describe critical or primary changes; these affect objects that have a controlling function in the SAP System, for example order creation or changes to material stock.
    V2 modules describe less critical secondary changes. These are pure statistical updates, for example, such as result calculations.
    The V1 modules are processed consecutively in a single update work process on the same application server. This means that they belong to the same database LUW and can be reversed. Furthermore, V1 updates are carried out under the SAP locks of the transaction that creates the update (see  The SAP Lock Concept). This ensures that the data remains consistent; simultaneous changes to the objects to be updated are not possible.
    All V2 updates are carried out in a separate LUW and not under the locks of the transaction that creates them. If your SAP System contains a work process for V2 updates, these are only carried out in this work process. If this is not the case, the V2 components are processed by a V1 update process.
    All V1 modules of an update must be processed before the V2 modules.
    U can also refer these links:
    http://www.erpgenie.com/abaptips/content/view/498/62/
    http://www.allinterview.com/showanswers/5513.html
    Regarding  v1 and v2 update and some other concepts.....
    Thanks
    Vasudha

  • IDSM-2, inline and Passive mode in same Module?

    Hi,i have a question that it can be strange.in our network we have implemented idsm-2 module in our 6513 Switch in inline mode.without any discution about network design suppose that our network is going beyond IDSM-2 Throughput and then we want to use IDSM-2 for some traffic in Passive mode insted of inline to reduce drop probability in inline mode.i mean before this state we were using idsm-2 data port 1(in vlan pair mode),now can we use data port 2 for this purpus(capturing some traffic on data port 2 for passive operation)? in other word idsm-2 can operate in this way?

    i found my answer in idsm-2 document "You can mix sensing modes on IDSM-2. For example, you can configure one data port for promiscuous mode and the other data port for inline VLAN pair mode. But because IDSM-2 only has two data ports and inline mode requires the use of both data ports as a pair, you cannot mix inline mode with either of the other two modes." but something else,for doing such thing suppos that i have sig 2004 configured for inline traffic to deny attacker inline then this action doesnt make any sense for some data in passive mode and suppos that for that kind of traffic which idsm-2 is operating in passive mode i want to just send an alert. so can i use deferent VS for doing this? thanks.

  • Mod Autoload and modules in rc.conf / boot time

    deleted
    Last edited by Misbah (2012-02-14 05:47:45)

    To answer your original questions:
    Misbah wrote:If the module is preloaded will it work that way?
    Yes. What I do is compile my own kernel with just the modules I need built into the kernel itself. You'll need to do some research into what modules you need for certain tasks though.
    Misbah wrote:if i didnt blacklist or remove anything, and just put them all under the modules= list, would it be any faster?
    Test it and find out. It's not always consistant across everyone's hardware/system.
    Misbah wrote:If i add a module into modules=, i dont have to add the modules it calls on right? It will load those automatically? ie) I just have to add rt2500pci and it will call on rt2x00pci and rt2x00lib itself right? And those in turn will call on other modules that it uses?
    Dependencies are called automatically.
    Misbah wrote:but I'm wondering if I can also gain any speed from simply having the same modules manually loaded as opposed to being autodetected and then loaded.
    How long does module loading take at the moment? If it's not a completely unreasonable time, I would say you are going to gain a negligable boot speed increase comparable to the effort involved. If you are really wanting to pursue a quicker bootspeed, then compiling your own custom kernel is the way to go. Even then, if bootspeed from GRUB to login prompt is less than 30seconds, gains are pretty much negligable.

  • Dma interrupt transfer modes in 6602

    I am using four simultaneous counters of a 6602 in continuous buffer modes
    using traditional DAQ. Gates used are PFI38 PFI 26 PFI 18 PFI 10.
    When I use set DAQ Device Information.vi to specify the "data transfer
    mode for GPCTR # " either in DMA (3 of them) or interruption mode ( one of
    them), I am not sure which # to use for the GPCTR #.
    In other words, must I specify GPCTR0, 3, 5 in DMA and GPCTR7 in interrupt?
    Otherwise stated, the simple fact that I use predefined PFI would associate
    the GPCTR concerned or, else, are these GPCTR defined as GPCTR0, 1, 2, and 3
    in the order I open their configurations in my Labview program.
    There is no clear definition of what GPCTR # actually mean in the Labview
    references.
    I have the feeling that some counters generating 15000 counts/sec do not use
    DMA but interrupt transfer modes instead.
    Gérard

    GPCTR# is the general purpose counter resource you are using, there are eight 32-bit counters on the 6602 card.  Unfortunately there are only 3DMA channels which means that if you plan on 4 very high speed buffered counting acquisitions then you could have some trouble since interrupts run much slower than the DMA channels.  I have had no problem using a mix of interrupts and DMA channels for continuously buffered counting with 4-8 counters at a time but the collection rate was only a few KHz faster than this the buffering using interrupts can not keep up an will overrun causing a "buffer overrun" error.  If you really need many highspeed buffer counters running simultaneously you could try using 2 cards but this seems costly (RTSI cable will allow multi-card synchronization).
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

Maybe you are looking for

  • Will it ever be possible to stream music on iOS devices instead of having to download it?

    Will it ever be possible to stream music on iOS devices instead of having to download it?

  • ALV List Question

    I have very long rows in ALV output. Its more than 550 characters.  I made line-size very high (1023) in the report, but it still splits the output row and puts in 2 rows when I run in BACKGROUND (ONLY). When I run in foreground it displays sinnle ro

  • FMOD or EXIT_SAPLFMFA_004

    Hi, We are on ECC6 and EHP 4, with FM BCS activated from 1st Apr 2015. We are getting issues where in table FMIOI is not updated with all the line items for purchase orders created before FM activation. We have been advised by SAP to use FMOD or EXIT

  • So you can't add a podcast from a URL right?

    It has to be from the iTunes store?

  • Mail - Can't trace mail.plist

    Hi My internal HD packed up on me a couple of months back.  I've replaced but now I'm looking to rebuild my mail (folders and emails).  The old HD is now in a USB SATA Hard Drive docking station and I can access (what seems to be) most things. I cann