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

Pages: [1]
1
µTasker general / Re: fnRead with different message length
« on: November 10, 2011, 09:56:42 AM »
Hi Mark,
thank you for your explanation. After reading again the documentation, my mistake is evident. I had consisered that the fnRead was based on a complete message transfer and not on a per byte basis.
Now it works fine.

Regards
Francis

2
µTasker general / fnRead with different message length
« on: November 09, 2011, 11:52:41 PM »
Hi Mark,

I would like to monitor the ARP resolution for UDP sockets. So I've added a "case 'A':" in the task loop to gather the messages from the ARP task. These messages are 2 bytes longer than the timer and interrupts messages that are tested in the loop.
If I modify the length in the fnRead call from HEADER_LENGTH to HEADER_LENGTH+2, the application no longer works, the timer and interrupts events are not seen.
If I set the length to HEADER_LENGTH, the application works well but I can't access the ARP infos that are after the message header.

What happens in the fnRead function when the indicated length is greater than the message length? Howto write the program ith different length messages?

Thank you for your help.

Regards
Francis

Code sample :
-----------------
  unsigned char ucInputMessage[HEADER_LENGTH+2]; // +2 for ARP infos
 
  QUEUE_TRANSFER length;
  // loop
  while(fnRead(PortIdInternal, ucInputMessage, HEADER_LENGTH + 2))
  {
    switch(ucInputMessage[MSG_SOURCE_TASK])
    {
      case TIMER_EVENT: // timer event either periodic or command timer
        if(ucInputMessage[MSG_TIMER_EVENT] == E_TIMER_PERIODIC) // execute state machine
        {
....
     case 'A': // infos from ARP task
        length of ucInputMessage is HEADER_LENGTH + 2
...

3
Problem has been solved.

We simply add a delay before switching from the internal relaxation oscillator (activated at startup) to the external oscillator.
File M5223X.c  function "mcf52235_init" :
volatile int i;
for(i=0; i<100000; i++) { asm(nop);}






4
Hi All,

I've made a board with a M52258 with an external 48 MHz oscillator. The design works perfect but doesn't start when powering up. After a hardware reset or ressetting with the BDM, it starts normally.

Does anybody have any idea about what can be the reason of that issue? Can it be the external oscillator which didn't start fast enough vs. the processor?

Thank you for any possible help.

Best Regards
Francis

5
Hi Mark,

after recompilation with CodeWarrior 7.1 (7.1.2 Patch, Build 11) of a well working µTasker V1.3 project, the new version works well but I was unable to download web pages with ftp. I checked with Wireshark the differences between the two versions. With the new version, the file is tansmitted, the ftp server acknowledges each segment but at the end of the file, it doesn't  send the final FIN, ACK and the transfer hangs.
I tried with several ftp clients and the behaviour remains always the same.

The comparison of the memory maps of the two versions, with same optimizations parameters, shows that the generated code is a little smaller : 512 bytes / approx. 64K.

Do you already have information about this issue?

Best regards
Francis


6
Hi Mark,
just an idea : when the PC issues the ARP request, the frame is sent with a broadcast destination MAC address (ff:ff:...). For the other messages, the destination MAC address is the MAC of the board. Is it possible to have a wrong MAC address in the FEC so all frames are rejected by the hardware level?

------------
Yes that was the reason. I've choosen randomly a MAC Address which seems to be a multicast address (07-00-00-00-00-01). According to the user manual of the "MCF52235 ColdFire® Integrated Microcontroller Reference Manual, Rev. 3" page 18-9, the chip performs additionnal tests and the frame was rejected. All works well with a "good" MAC.
I hope my mistake will help other developpers.

Regards
Francis

7
Hi Mark,
with the simulator, ping, udp echo ... works well. After downloading the application on either a M52233DEMO or my target board (compiled with CodeWarrior 7.0) only ARP works perfectly.
I first clean the ARP cache on the PC, then I send a ping : with Wireshark, I see the ARP request and response from the board then the ping request and no answer from the board. The ipstat in the debug console reports the ARP frame but 0 ICMP frame. I tested also with UDP and I get the same result. It looks like only frames with Ethertype 0x0806 go through the filter?
I've tryed to find the location in the code where this test is done. Can you please give me some indications where to look at?

Regards
Francis

PS. Autonegociation or fixed speed give the same thing.

8
NXPTM M522XX, KINETIS and i.MX RT / Re: Using PORTAN as digital inputs
« on: April 04, 2009, 09:42:49 PM »
Hi mark,

thank you, there are so many registers and configurations. I will work now with the M52235 user's guide always open.

Regards
Francis

9
NXPTM M522XX, KINETIS and i.MX RT / Re: Using PORTAN as digital inputs
« on: April 04, 2009, 08:44:46 PM »
Hi Mark,

effectively it works well. On the simulator it's possible now to change the value of each input. To read the inputs I simply use
"port = PORTAN" and then a mask for each input. The "port" variable stays always at 0. (printed out with "fnDebugDec(port, 0, 0);").
Are the changes on the GUI normally reported to PORTAN or not?

Regards,
Francis

10
NXPTM M522XX, KINETIS and i.MX RT / Using PORTAN as digital inputs
« on: April 04, 2009, 06:35:37 PM »
Hello Mark,
I've started an new application and I simply want to use AN0 to AN3 as digital inputs.
I programmed the following in the init part of the new included task.
      DDRAN &= ~(PORT_AN_BIT0 | PORT_AN_BIT1 | PORT_AN_BIT2 | PORT_AN_BIT3);                                             
When I launch the simulator, the PORT AN still shows all I/O as outputs.
Where must the init code be inserted in so the simulator really sees the inputs and allows changing the input state.

Thank for help, best regards

Francis

11
µTasker general / Re: No more answer on Ethernet after HTTP use
« on: March 07, 2009, 05:15:07 PM »
Hi Mark,
I've done several tests on 3 different PC. On machine with Intel processor it works nominally : one machine has a E5200 dual core, the other is a laptop under Linux with Windows XP in a virtual machine running under VmWare Workstation. For these two configuration no problem.
The other PC has an Athlon XP2500+ processor : I have the same problem as with mine which is a Athlon 64 bit Dual Core 4600+.
What are the differences making AMD processors working bad?

Disabling HTTP_WINDOWING_BUFFERS has no effect.

Amazing no?

Regards
Francis

12
µTasker general / Re: No more answer on Ethernet after HTTP use
« on: March 07, 2009, 10:52:43 AM »
Hi Mark,
thank you for your advice. I've loaded the last version of WinPcap and the behaviour is quite good. The application continues to answer to ping request and its remain possible to connect with ftp. The http server still doesn't serve the pages but we get a response "TCP previous segment lost ..." (see the attached wireshark capture).

I will try the sample application on a other PC.

Regards
Francis

13
µTasker general / No more answer on Ethernet after HTTP use
« on: March 06, 2009, 11:44:39 PM »
Hi,
in the Simulator all works fine at the beginning after installation of SP8 for M5223X. ARP, Ping, ... There was no webpages already downloaded so the HHTP server return the 404 page. Then, no problem for downloading the pages with FTP. Ping works always ok after it.
But when I use the browser to get the pages (with http://<ip_address>) the browser times out, no page is returned. From this point, nothing works : no ping response, no FTP connection, ... The application must be exited and launched again for ping to work.
If I try to get the pages, again no response. I've tryed to set breakpoints and step through the code but nothing seems to go wrong the functions sending the response are called but nothing comes out. I've checked it with Ethereal.

What do I make wrong? Thanks anybody for help.
Regards.
Francis

Pages: [1]