Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - neil

Pages: 1 ... 27 28 [29] 30
421
NXPTM M522XX, KINETIS and i.MX RT / Uart Question
« on: September 07, 2007, 08:46:49 PM »
Hi,
  When any of the 3 uarts are setup (in 52235) to be used for DMA or interupt driven. I would like to check to make sure any previous data within buffer has been fully sent before sending next one, how do I do this?  This will prevent me of having a large buffer, preventing overflow.

Regards
Neil

422
Hi Mark,
  Its a  pitty that the 52235 doesnt have an on board USB, as I will have to communicate with some USB devices. I have a few samples of a
'USB Peripheral/Host Controller with SPI Interface' device from maxim.  http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3639

I am designing a prototype board, and inserting this onto the spi bus. I will only be using it to connect to devices and communicating. I am new to USB, so will have a learning curve first to tackle :'(

Neil

423
µTasker general / Serial Port
« on: August 02, 2007, 03:56:39 PM »
Hi,
  I have a serial port configured as UART_TX_DMA for sending.  How do I know when all the data is sent? Just so the applicaiton can send another block known that the previous wont be overwritten before being sent.

Regards
Neil

424
NXPTM M522XX, KINETIS and i.MX RT / sprintf(..)
« on: July 31, 2007, 02:53:39 PM »
Hi,
  I have included stdio.h within application.c so I can use sprintf(..), but the compiler complains regarding 'typedef unsigned int size_t;' which is in the types.h file of utasker. Any point me to the way around this?

Thanks
Neil
 

425
Hi,
   Has anyone used USB to UART chip?  There are various chips out there that does it, but I am not sure how good they are. Any feedback would be excellent,as we hope to include USB later this year.

Here is a link to one on the farnell web page. Its the development board, but they also do the chips. I havent looked yet too much into this, so cant really give an opinion yet.

http://uk.farnell.com/jsp/Semiconductors/Development+Tools+&+Programming/displayProduct.jsp?sku=1146036&_requestid=294758

Neil

426
µTasker general / Re: Boot Loader
« on: July 26, 2007, 12:59:28 PM »
Hi Mark,
  When a firmware updated is needed, my own code has to save the new firmware (will be either from ethernet, or GPRS (serial)) onto external memory (this is the way we want to go), and do we simply reset the processor, then the bootloader will come into play?

How does the bootloader know where the file is? We will have 2 external eeproms, one for firmware, and one for our own data. As we will be using the 1MB (actually a bit larger), we would like to use the rest of the chip for our own data, would this be a problem?

We save data on the flash every minute, and because  there is a maximum writes per page we have to be carefull of not using same pages too often (as the page gets cleared when data is sent to our server), so we never reset the save pointer, always increase , then loop to start again. Do you do the same?

Is there anyway we can use data card, that holds 16MB etc too?

You mention that you do not use the 52235 own spi chip select, but an IO, but you use the SPI interface (and not IO lines for communication)?

Regards
Neil

427
µTasker general / Re: Using TCP in the uTasker project
« on: July 25, 2007, 02:28:37 PM »
Hi Mark,
  Nice article above.

Regarding 'TCP_EVENT_REGENERATE'. You mention that the previous message must be resent. Is there a chance that there can be an endless event, where the call back keeps getting 'TCP_EVENT_REGENERATE' everytime the message is resent (for some weird reason)? If so I assume that its best to retry 'x' amount of times before closing the connection?

I have written a lot in sockets on Windows applications, and never had to worry about the lo-level 'ACKs' etc as these are all hidden. So please excuse my basic  questions  :)

I understand that if I simply receive a 'TCP_EVENT_REGENERATE', I do a resend. And if I get a 'APP_SENT_DATA', the data was transmitted/received okay.
I thought the only messages I would really have to manage are 'TCP_EVENT_REGENERATE' , 'APP_SENT_DATA', 'TCP_EVENT_CONNECTED'. But after I resend if a  'TCP_EVENT_REGENERATE'  is returned, I will get a ''TCP_EVENT_ACK' instead of a  'APP_SENT_DATA' . Is this correct?

But if the data cannot be resent, if I receive a  'TCP_EVENT_REGENERATE', I simply wait for a ''TCP_EVENT_ACK' before doing anything else with the socket (apart from closing it)?

Is that the basics, or am I missing something else  ???
Thanks
Neil
 


428
µTasker general / Re: Using TCP in the uTasker project
« on: July 23, 2007, 04:08:16 PM »
Hi mark,
  Regarding the previous problem of not being able to connect.

With the problem above, not connecting, I was trying it on the sumilator. I now copied the code into the 52233 flash. And it worked fine, without modifying any code.

Within the call back routine above 'static int fnTestListener(USOCKET Socket, unsigned char ucEvent, unsigned char *ucIp_Data, unsigned short usPortLen)' is 'ucIp_Data' a pointer to the data read in, and 'usPortLen', The number of characters?

Regards
Neil

429
µTasker general / Re: Using TCP in the uTasker project
« on: July 23, 2007, 03:06:16 PM »
Hi Mark,
  Thanks for the reply.
It worked fine as you mentioned, I just never realised that the header had to be included, just thought need to provide a buffer,but worked fine.

It strange, as I tried it , and all worked fine, I then closed my server and simulator. Then re-ran them the same way. The simulator tried to connect, but a connections didnt make a connection. Ive tried it several times, but no luck. Ive managed 2 connections from about 10 attempts. If I run my windows client application we use, we can do the exactly the same thing I am trying with the simulator, and everytime it connects tot he server.

Regards
Neil

430
µTasker general / Re: Using TCP in the uTasker project
« on: July 22, 2007, 01:08:13 PM »
Hi mark,
  After succesfully connecting to my server application (Windows based), I thought I would send some data. I want to send the following block of data, which my server application understands as a command:

After a connection is made, within the call back function I insert the code to send to my server, as follows:

unsigned char Buff[10];
//call back function
static int fnTestSocket(USOCKET Socket, unsigned char ucEvent, unsigned char *ucIp_Data, unsigned short usPortLen)
{
   TCP_MESSAGE test_message;

    switch (ucEvent)
   {
         case TCP_EVENT_CONNECTED:
                Buff[0]=0;
                Buff[1]=5;
                Buff[2]=233;
                 Buff[3]=5;
                Buff[4]=32;
                          if (fnSendTCP(Socket, &Buff[0], 5, TCP_FLAG_PUSH) > 0)
                   return APP_SENT_DATA;
                         break;

                    ....
             }


The above gets sent, but when I debug my server application, the above values are not received, there are 5 characters sent, but not the above.

Can you point me to where I am going wrong?

Regards
Neil

431
µTasker general / Re: Boot Loader
« on: July 21, 2007, 09:17:49 PM »
Hi Mark,
  Mid august will be fine for me, as I can design the board around this.

  The device has 4096 pages with 264bytes/page, giving it a total of 1081344 bytes. I think the layout is the same as the smaller part, but with more pages (not sure though). Heres a link to the datasheet: http://www.atmel.com/dyn/resources/prod_documents/doc2225.pdf

At present I simply save data results from page 100 to 4095, below 100 for applicaiton setup. I have a 264 bytes buffer in my processor, and fill this up. When time to save, I simply save the whole page, which is a lot quicker than saving byte per byte. Its a bit more tricker when the data overlaps the page boundry. This is where I then load the next page, and patch in the rest of the data to save. I have a structure which deals with the position with the memory. As you can see, its nothing fancy, but this way I can save a lot of data there, with ease. My application only saves data, and not seperate files, so no need for FAT tables etc.

Neil

432
µTasker general / Re: Boot Loader
« on: July 21, 2007, 07:22:08 PM »
Hi mark,
  excellent, at present I am using the atmel part 45DB081D (1MB) which is an excellent part. I havent designed the board yet, waiting till I fully test utasker (which so far is excellent). But if the bootloader will soon be available for this part then that would be great. Do you recon this feature will be available soon?

My application will be using the  45DB081D (as well as another one for bootloader ;) ) , can I use the file system on this one too? If I also have 2 , I assume it will be a matter of selecting which qspi chip select to use on which device, as there are 4 available?

If I use the 45DB081D for bootloader too (its cheap, and as I have many of these, dont want to purchase smaller versions), I assume that I can use the free space for other things too, like program setup etc?

Thanks again
Neil

433
µTasker general / Re: Boot Loader
« on: July 21, 2007, 05:38:04 PM »
Hi mark,
  Thanks for the reply. It sounds perfect for our needs. One thing, is it possible to have the downloaded code stored in an external flash, rather than internal flash? This way we can use more space for our code (as it will grow in time).

Neil

434
µTasker general / Re: Using TCP in the uTasker project
« on: July 21, 2007, 05:09:12 PM »
Hi Mark,
  The above worked fine, thanks, I can now connect to the server application.  I will soon start looking at sending/receiving side.

Many Thanks
Neil

435
µTasker general / Re: Using TCP in the uTasker project
« on: July 21, 2007, 02:49:44 PM »
Hi Mark,
 I quickly tried to add a client, and have it connecting to my server application, but without any luck.  Could you let me know what I am doing wrong? Here is the small code.. (It just simply connects, no sends/receives)

USOCKET Test_socket;

static int fnTestSocket(USOCKET Socket, unsigned char ucEvent, unsigned char *ucIp_Data, unsigned short usPortLen)
{

    switch (ucEvent)
   {
      case TCP_EVENT_CONREQ:                                             
      case TCP_EVENT_CONNECTED:
      case TCP_EVENT_CLOSE:
      case TCP_EVENT_ACK:
      case TCP_EVENT_ARP_RESOLUTION_FAILED:
      case TCP_EVENT_PARTIAL_ACK:
         break;
      case TCP_EVENT_REGENERATE:
      case TCP_EVENT_DATA:
         if ((ucEvent == TCP_EVENT_REGENERATE) || (!uMemcmp((CHAR*)ucIp_Data, "TEST" , 4)))
         {
         }            }
         break;
      case TCP_EVENT_ABORT:
      case TCP_EVENT_CLOSED:
         break;
   }
    return APP_ACCEPT;
}


Within the 'fnApplication(..)', making it the last bit of code within 'if (!iAppState)':

Test_socket = fnGetTCP_Socket(TOS_MINIMISE_DELAY, (unsigned short)20, fnTestSocket);
fnTCP_Connect(Test_socket, "192.168.0.184", 10000, 0, 0); //my server address and port...

The connection is never made (all done within simulator), and the call back function always gets called with switch value of '9'.

I have my server application running in debug, so I can tell when a connection is made.
Regards
Neil

Pages: 1 ... 27 28 [29] 30