Google Groups Home
Help | Sign in
problem with uartlite in microblaze
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
bhb  
View profile
 More options Mar 28, 11:27 am
Newsgroups: comp.arch.fpga
From: "bhb" <bhb...@yahoo.fr>
Date: Fri, 28 Mar 2008 16:27:53 +0100
Local: Fri, Mar 28 2008 11:27 am
Subject: problem with uartlite in microblaze
Hi,

I 'm learning to use microblaze (microblaze, EDK 9.1 sp2).
I try to use the Send function of uartlite.
Please, find below my c code.
the result of this code (with hyperterminal) is :

-- Entering main() --
nXUartLite_Send
-- status true--
-- status true--
-- XUartLite_SendByte --
e
-- Exiting main() --

I never received the 'D' char (byte_buf = 0x44), and val.
Is someone could hep me.
thanks in advance
bhb.

--------------------------------------------------------------------------- -
-----------------------------------
#include "xparameters.h"
#include "stdio.h"
#include "xuartlite_l.h"
#include "xuartlite.h"
#include "xstatus.h"

//====================================================
void STATUS_CHECK(Status)            \
    {                                   \
        if (Status != XST_SUCCESS)      \
        {
   print("\r\n -- status bad--\r\n");
            return Status;              \
        }
        else
         {
   print("\r\n -- status true--\r\n");
            return Status;              \
        }
    }

//====================================================

int main (void) {
Xuint8 byte_buf = 0x44;
XUartLite UartLite;
XStatus Status;
unsigned int val;
   print("\r\n -- Entering main() --\r\n");

   print("\r\nXUartLite_Send \r\n");
   Status = XUartLite_Initialize(&UartLite, XPAR_RS232_UART_1_BASEADDR);
   STATUS_CHECK(Status);
   Status = XUartLite_SelfTest(&UartLite);
   STATUS_CHECK(Status);
   XUartLite_ResetFifos(&UartLite);
   val = XUartLite_Send(&UartLite, &byte_buf, 1);
   print(val);

   print("\r\n -- XUartLite_SendByte --\r\n");
   XUartLite_SendByte(XPAR_RS232_UART_1_BASEADDR, 'e');

   print("\r\n -- Exiting main() --\r\n");
   return 0;


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google