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.


Topics - neil

Pages: 1 ... 6 7 [8] 9 10
106
NXPTM M522XX, KINETIS and i.MX RT / Using Parameter Block
« on: January 16, 2009, 03:52:53 PM »
Hi Mark,
  The only parts of the parameter block we use in this current project is the NETWORK_PARAMETERS. We plan to use the flash memory to save/load this information. These network parameter block will only be modified with a direct connection to the unit, and not remotely. As this is the case , I cant see the benefit of having a swap parameter block, as the values are verified after being written.

A couple of things I want to check with yourself:

1. Looking at the application task there is a fnGetOurParameters() command. Does this check if there is a set of parameters in flash, and if valid will use these? Does this overwrite the default values at the top of the file (static const NETWORK_PARAMETERS network_default = {) ?

2. After the valid parameters are loaded, or default used  how do I gain access to active values, is it through pointer temp_pars?

3. When it comes to change the NETWORK_PARAMETERS values, can I simply place new values in these, and call  fnSaveNewPars(SAVE_NEW_PARAMETERS);  ?

4.The does the processor have to be reset for new values to take place?

Many Thanks
Neil

107
Luminary Micro TM LM3SXXXX / Luminary Progress
« on: January 14, 2009, 10:23:03 AM »
Hi Mark,
  I was looking on Luminary web page , and really impressed at their chips, especially 64k ram, USB and ethernet.

As you know I use the freescale part, and was wondering how the progress of utasker is compared to the freescale? I am still in the developing stage of my project, so changing processor is still possible, even though a bit of a pain in design.

Also, do you know if availability is good for these parts?

Regards
Neil

108
NXPTM M522XX, KINETIS and i.MX RT / file system and bootloader
« on: January 12, 2009, 01:03:07 PM »
Hi Mark,
  I have a system with 1 external spi memory chip (AT45DB081B). I plan to use the first 256k for bootloader, the next 2 pages(or maybe  a bit more) for my use, and the rest for uFilesystem. 

I have tested the spi bootloader, and spi uFilesystem (but not at the same time), and works great. But not sure what to set so I can use the memory as above.

Also,what happens to the parameter block in this case?  I would like to have the parameter block in spi memory. Looking at the document, this is at the start of the spi memory block, so will this be after the bootloader space, and the 2 pages I want to set aside.

Im using the 256k memory freescale parts, could you let me know what, and values to set to get the above to work?

Regards
Neil



109
µTasker general / No Need For Locking?
« on: January 09, 2009, 12:39:24 PM »
Hi Mark,
  I was going to make sure I am right, before I continue. I have a routine that is called from the serial,USB and ethernet task, so at any stage, one of these tasks can call this routine. I must make sure that one task doesnt call the routine when another task is already in it.  I was going to place a variable lock at the start of the routine,so each task has to wait till its free before continuing.

But, am I right in saying, a task has to complete before another one gets control? And as this routine is only called from a task, and not an interupt directly, then there is no need for the lock?

Neil

110
NXPTM M522XX, KINETIS and i.MX RT / TCP Buffer
« on: January 06, 2009, 05:29:34 PM »
Hi Mark,
  I have a tcp connection in which text is sent to my server application. I do the following:

void SendMessage(unsigned char *Ptr,int Length)
{
TCP_MESSAGE test_message;
uMemcpy((CHAR*)&test_message.ucTCP_Message,&Ptr[0], Length);
fnSendTCP(TCPsocket, (unsigned char *)&test_message.TCP_Header, Length, TCP_FLAG_PUSH);
}

which works fine when doing 1 SendMessage(..). But If there is another SendMessage() soon after, characters are lost. Is there a facility within utasker to have a buffer for sending data (so a few SendMessage() can simply fill the buffer)?

Regards
Neil

111
µTasker general / close socket question
« on: December 18, 2008, 04:01:12 PM »
Hi Mark,
 Within TCP_EVENT_CLOSED event, I close the socket. But there are times when I would like to manually close the socket with the fnTCP_close(..); command, outwith the TCP_EVENT_CLOSED event.

I tried this, and straight away the TCP_EVENT_CLOSED event gets called, and a fnTCP_close(..) I placed there also gets called. And as soon as another attempt is made to connect to my server using the same socket, another TCP_EVENT_CLOSED, right before the connection is made.

Can I call the callback function with TCP_EVENT_CLOSED to close it (if so whats the best way)? Or do I set a flag when manually closing it so the fnTCP_close(..) after the TCP_EVENT_CLOS doesnt get called?

Regards
Neil

112
µTasker general / TCP ip address for incoming connection.
« on: December 18, 2008, 12:18:08 PM »
Hi Mark,
  I have an application where the user will communicate with the board simply by plugging the cable between there computer and the board. If out in the field they will have a direct connection from their laptops ethernet port to the board. Im not sure the best ip address to set for the unit. I assume if its a straight connection it can be the normal 192.168.0.3 (or any thing apart from 3), but if connected to a hub, then have to make sure it doesnt conflict. Any ideas? I know this isnt a utasker issue, but wondering if you have come accross this?

Regards
Neil




113
µTasker general / TCP Connection
« on: December 18, 2008, 11:39:39 AM »
Hi Mark,
  I have one TCP socket connected to my PC application server, which works excellent. I tested it by simply restarting the process (reset button, and power off/on), to see if the connection can be restablished from fresh again. But as soon as a connection is attemted by :
fnTCP_Connect(TCPsocket, IP, 21000, 0, 0);

I get a TCP_EVENT_ABORT message. Even if I restart the server application this happens. A connection can be remade after the system is left off for a few minutes and restarted (the server application doesnt have to be closed).

Before a connection is attempted, I wait 4 seconds allowing for initialisation then proceed with a connection. I am able to connect after a TCP_EVENT_ABORT message is received, is this normal? Do I place the line fnTCP_close(Socket); here, even though when resetting the processor a connection hasnt been made?

Regards
Neil



114
µTasker general / Checking Amount Of Free Memory
« on: December 15, 2008, 08:22:56 PM »
Hi Mark,
 Is there a way within utasker to check the amount of free RAM, and even code size during Run Time. I would like to  display amount of free Ram, and size of code at startup.

Neil

115
NXPTM M522XX, KINETIS and i.MX RT / Initialising SPI memory
« on: December 08, 2008, 04:17:35 PM »
Hi Mark,
  I have a device sharing the spi bus with external memory. To save power, I power up this device through an IO expander port I have on the I2C bus, so this has to be carried out before the fnConfigSPIFileSystem() is called.

I have moved the fnConfigSPIFileSystem(..) routine from the EXTERNSTATIC void fnInitHW(void)  within m5223x.c file, and placed it after my initialisation code. It works fine, but wondering if this may cause problems with utasker?

I would have liked to place my init code in the fnUserHWInit() routine which gets called before the above, but as fnUserHWInit() is before heap available, and I have to setup my device through I2C, then not sure if this would work.

Regards
Neil

116
NXPTM M522XX, KINETIS and i.MX RT / A/D Channels
« on: November 17, 2008, 03:16:10 PM »
Hi Mark,
  Is it possible to only use, say, 1 a/d channel on the 52235, and the rest of the port as I/O?

Neil

117
NXPTM M522XX, KINETIS and i.MX RT / Socket Not Closing
« on: November 14, 2008, 12:28:13 PM »
Hi Mark,
  I think I must be doing something wrong, but not sure what.

After a connection is made to socket, my windows application sends down about 270 bytes of data, which is read, and an "ACK" (this is an ascii "ACK" sent as a string) is sent back from 52235. If the windows app receives an "ACK"  then the procedure continues, until all data is sent, which works perfect. After  this , or anytime I attempt to close the connection from Windows with the following:
   shutdown(socket,SD_BOTH);
   closesocket(socket);
The TCP_EVENT_CLOSED never gets called, or never times out, even when closing the Windows application.

Here is the callback routine:
int fnTCPListener(USOCKET Socket, unsigned char ucEvent, unsigned char *ucIp_Data, unsigned short usPortLen)
{
   TCP_MESSAGE test_message;
   unsigned char Value;
   int Loop;
   
    switch (ucEvent) {
    case TCP_EVENT_CONNECTED:
               SendToUser((unsigned char *)"\r\nCONNECTED\r\n",strlen("\r\nCONNECTED\r\n")); //message sent through serial
    case TCP_EVENT_CONREQ:                                             
    case TCP_EVENT_CLOSE:
    case TCP_EVENT_ACK:
    case TCP_EVENT_ARP_RESOLUTION_FAILED:
    case TCP_EVENT_PARTIAL_ACK:
        break;
    case TCP_EVENT_REGENERATE:
       break;
    case TCP_EVENT_DATA:
          for(Loop=0;Loop<usPortLen;Loop++)
          {
             Value=ucIp_Data[Loop];
               if(!ReadInBlock(&TCBrxBuff,Value)) //simply reads into own buffer, and checks to see if all read..
              { //Yip all read in , now proceed with command request...
                      RxBuff=&TCPrxBuff;//point to structure being processed
                   ProcessCommand(); //process command..
              }
      }
        break;
    case TCP_EVENT_ABORT:
    case TCP_EVENT_CLOSED:
        fnTCP_Listen(Socket, TCP_INPORT, 0);                    // go back to listening state
         SendToUser((unsigned char *)"\r\nCLOSED\r\n",strlen("\r\nCLOSED\r\n"));
       
        break;
        }

    return APP_ACCEPT;
}

void ProcessCommand(void)
{
 //command carried out here.. ie saved into spi eeprom
      TCP_MESSAGE test_message;
   strcpy(test_message.ucTCP_Message,"ACK");
   fnSendTCP(Test_socket, (unsigned char *)&test_message.TCP_Header, 3, TCP_FLAG_PUSH);
}


But cant close connection..

Regards
Neil

118
NXPTM M522XX, KINETIS and i.MX RT / user socket
« on: November 13, 2008, 02:36:35 PM »
Hi Mark,
 I want to use TCP sockets for incoming and outgoing connections. The incoming connection will not be HTTP port 80, I wish to use another port. Do I still #define USE_HTTP within config.sys? And I assume that I set USER_TCP_SOCKETS to the number of sockets I wish to use (does this include incoming connections too) ?

Regards
Neil


119
NXPTM M522XX, KINETIS and i.MX RT / bootloader problem
« on: November 12, 2008, 03:54:51 PM »
Hi Mark
  I seem to be having problems with the bootloader (I have 1 atmel spi eeprom for this), I am using CW7. 

I done the following: Bootloader project.
1. #define SPI_SW_UPLOAD   within config.h
2. #define _ENCRYPTED  within utaskerbootloader.c within #if defined (_M5223X)
3. erased full memory, then programmed as normal.

I done the following: Application project.
1.Selected bare_min_app_rom_spi
2.#define SPI_SW_UPLOAD   within config.h within #ifdef _M5223X
3.compiled, and erased from 0x1000 to end
4.programmed from 0x1000 to end..

I then ran the board which works.. I changed a bit of code, then compiled the application and ran "bm-convert_encrypt.bat" .

Within my windows application I sent down the encrypted file to the SPI eeprom. I send one page at a time, which gets programmed starting at page 0, then read in and verified with the data sent. An Ack is sent back informing the windows app to send the next page, or NAK if error. The next page gets sent, and so on.
I have a routine that also verfies that the file sent matches the one in spi eeprom

I then restart the board (pressing the restart button), but the same original app is ran. The new one doesnt get copied. Is my procedure wrong?

Do I have to change some location of the start of the file system, so its past the 256k for firmware updates? If so what do I change?
 
Regards
Neil



120
NXPTM M522XX, KINETIS and i.MX RT / changing serial baud rate
« on: November 07, 2008, 09:34:03 PM »
Hi Mark,
  I have the 52233 serial port connected to a multiplexer so I can address 8 serial devices on the same port. All works well, and all operatore at 9600 baud. I now have one device connected to the multiplexer that requires 2400 baud . How can I change the baud rate between transfers? I assume I will have to clear the tx buffer before doing so.

Best Regards
Neil

Pages: 1 ... 6 7 [8] 9 10