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 - kaflick

Pages: [1]
1
NXPTM M522XX, KINETIS and i.MX RT / Bootload problem
« on: May 29, 2012, 08:26:11 PM »
I am trying to get the bootloader working with my application and the bootloader location is apparently different from where the application puts the new code.  I am using the spi flash for the download and I am downloading the file over ftp (using the HS.bin name).  The download seems to work fine, it does not show up in the on-chip filesystem but when I get the file from ftp it compares exactly to what I sent.  When the bootloader reads the header all of the values are wrong so I assume that it is reading in the wrong place.  Where is the write done in the application so I can look at the values there and compare with the bootloader?

If you have a writeup on the values used for the locations please direct me to that too.

Thank you,
Keith A Flick

2
NXPTM M522XX, KINETIS and i.MX RT / iic problem
« on: April 13, 2012, 01:21:00 AM »
I have a problem with the iic routine.  I changed my application from running on a 1ms
timer (which seemed very irregular) to being called every 1ms in TaskConfig.h (which
seems very regular) and everything works fine except the iic which waits forever in the
new lines labeled 116 in fnTxIIC (specifically on the while).  It never comes out.

I made sure it was being set up by getting through fnConfigIIC and it looked OK.

What should I look at?

Keith Flick

3
Hello,
  We are starting another EIP project with the 52259 and are to the point where we are running the system with a robot controller that also commands our system through EIP (Ethernet Industrial Protocol).  Everything works correctly except the sends of our half of the communications are delayed.  I am logging when we receive an incoming communication and when we send an outgoing communication (there is a sequence number in EIP which makes this easy).

At the beginning of the communication stream the numbers of incoming communications and outgoing communications are logged together and appear together on the ethernet (using wireshark).  As the communications continue our outgoing communications fall farther and farther behind.  After a while our communications stop.  At this point we have logged receiving and sending communications together but wireshark reports our output messages are around 1000 messages behind the incoming messages.  In other words we have received message 10000 and sent message 10000 but the messages wireshark has seen are incoming message 10000 and outgoing message 9000 which were adjacent on the wire.  These numbers do seem to be about correct, we fall behind at just about a 1 per 10 rate.

No errors are reported by any of the calls to uTasker in sending these messages and I have added extra buffers to see if it made a difference (it did not).

The Ethernet does not seem to be too busy to allow sending at the correct rate (they are only 32 bytes long and sent every 50 ms) and this is the same rate as our old system (on the 52235) so we have a faster processor with twice as much memory but the Ethernet can't seem to keep up.

Any suggestions?

Thanks for your attention
Keith Flick

4
We are trying to use i2c to communicate between two processors.

Is there anyone who is doing anything like this?

We have two processor boards with an i2c link between them and
it is the one thing that is not working for us yet that is holding us up.

Here is my init code:


//
//   Init I2C
//
   switch (BoardNum) {
      case FRONTBOARD:
          tIICParameters.Channel = FRONT_IIC_CHANNEL;  // channel 0
         break;
      case BACKBOARD:
          tIICParameters.Channel = BACK_IIC_CHANNEL;  // also channel 0
         break;
   }
    tIICParameters.usSpeed = 400;                                        // 1M
    tIICParameters.Rx_tx_sizes.TxQueueSize = 64;                         // transmit queue size
    tIICParameters.Rx_tx_sizes.RxQueueSize = 64;                         // receive queue size
    tIICParameters.Task_to_wake = 0;                                     // no wake on transmission
    if ((IICPortID = fnOpen( TYPE_IIC, FOR_I_O, &tIICParameters)) !=0) {
      i=sprintf(DebugStr,"I2C Init %d\n\r",IICPortID);
      fnWrite(SerialPortID, (unsigned char *)DebugStr,i);
    }// open the channel with defined configurations
    else {
      fnWrite(SerialPortID, (unsigned char *)"I2C Init Error\n\r",16);
    }

It opens with IICPortID 17 on both ends and when I try to send or receive the system hangs.
I have on system that tries to send:

unsigned char teststr[]={
   0,'A',0
};

fnWrite(IICPortID, teststr,2);

The other system reads:

tmpcnt=fnRead(IICPortID,(unsigned char *)i2cbuf,2);

I don't understand the i2c hardware/software enough to know if I am doing it right.
Any suggestions?

Keith Flick
kaflick@sev.org


5
µTasker general / Ethernet/IP (Industrial Protocol) anyone?
« on: April 27, 2010, 07:28:22 PM »
Is there anyone using uTasker and/or the M52235 family with the Ethernet/IP industrial protocol?

We are doing so and would like to know if anyone else has fought their way through.

We are using the Real Time Automation Ethernet/IP stack and would like to know what other
people are using.

For those who don't know the Ethernet/IP protocol is used over Ethernet (obviously) and the
main use for it is to allow remote access as a digital I/O board.  Bits can be turned on or off
and parameters passed in a protocol that allows a (semi) real-time access.

Keith Flick

Pages: [1]