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

Pages: [1]
µTasker general / Re: about the udp use!
« on: January 23, 2008, 07:54:30 PM »
Someday I will go nuts...
Now it works again.
I will try to make it not work again and then debug.

Thanks for your reply,

µTasker general / Re: about the udp use!
« on: January 23, 2008, 05:07:00 PM »
Now I have a problem with UDP:

static USOCKET UDP_data_socket = -1;

static int fnUDPListner(USOCKET SocketNr, unsigned char ucEvent, unsigned char *ucIP, unsigned short usPortNr, unsigned char *data, unsigned short usLength);

void StartListen(void) {
   if (((UDP_data_socket = fnGetUDP_socket(TOS_MINIMISE_DELAY, fnUDPListner, (UDP_OPT_SEND_CS | UDP_OPT_CHECK_CS))) >= 0)) {
        fnBindSocket(UDP_data_socket, RECEIVE_DATA_PORT_NUMBER);                         // Bind socket
    else {

static int fnUDPListner(USOCKET SocketNr, unsigned char ucEvent, unsigned char *ucIP, unsigned short usPortNr, unsigned char *data, unsigned short usLength) {

When I comment
fnBindSocket(UDP_data_socket, RECEIVE_DATA_PORT_NUMBER);                         // Bind socket
it works.
But if it is uncommented, the mcu crashes and resets.
Strange things is, that this worked before.
I have enough udp sockets reserved (10).

Help :)

µTasker general / Re: How to use the UART to get data and send data!
« on: January 21, 2008, 12:57:59 PM »
It seems that I called the code before the usart was initialized.
Now I check
if (SerialPortID > 0) {
and it works.
But is the check correct? What is the initial value of SerialPortID?

I also had to comment some lines in the application.c which echoes the received chars.

Finallly everything is working!!
The CAN driver is self implemented.

Thank you for your support,

µTasker general / Re: How to use the UART to get data and send data!
« on: January 20, 2008, 06:56:17 PM »
I can write to the serial port and receive it on the pc. But when I try to receive data, it crashes.

I use the following code:

if (fnMsgs(SerialPortID) > 0) {
unsigned char ucRx[10];
unsigned char ucLength = 5;
ucLength = fnRead( SerialPortID, ucRx, 10);
fnWrite(SerialPortID, (unsigned char *)ucRx, ucLength);

When it is commented, ethernet, can and serial send work.
But as soon as I uncomment it, ethernet and serial send don't work anymore. Only can goes on but very unreliable.

I tried many things like changing the defines in config.h and the parameters in application.c.
It didn't work.
What to do?
Is there some tutorial how to do it? I tried all things written in the forum and also from the documents.

I use serial port 0.


ATMELTM AT91SAM7X and AVR32 / Error with Windows Simulator
« on: January 15, 2008, 11:47:40 PM »
I use the ethernet example exactly as in the tutorial.

if ((TCP_data_socket = fnGetTCP_Socket(TOS_MINIMISE_DELAY, TCP_DEFAULT_TIMEOUT, fnDataListener)) >= 0) {
         fnTCP_Listen(TCP_data_socket, DATA_PORT_NUMBER, 0);

static int fnDataListener(USOCKET Socket, unsigned char ucEvent, unsigned char *ucIp_Data, unsigned short usPortLen) {
   unsigned char ucTestData[10] = {0,1,2,3,4,5,6,7,8,9};
   switch (ucEvent) {
      case TCP_EVENT_CONNECTED:   // Connection has been established
         if (fnSendTCP(TCP_data_socket, ucTestData, 9, TCP_FLAG_PUSH) > 0) {
            return APP_SENT_DATA;
return APP_ACCEPT;   //Standard reply which accepts

When I call the port with my webbrowser the VS throws an exception
"Run-Time Check Failure #2 - Stack around the variable 'ucTestData' was corrupted.".

When I changed the datatype of ucTestData to unsigned short or int or something, it doesn't crash. But the received data is trash.

ATMELTM AT91SAM7X and AVR32 / SP2 - Problems with CAN
« on: January 15, 2008, 01:42:10 PM »

I try to compile SP2 with CAN_INTERFACE enabled.

In VS I get the following errors:
Error   1   error LNK2019: unresolved external symbol _fnCAN_get_rx referenced in function _entry_can   can_drv.obj   

Error   2   error LNK2019: unresolved external symbol _fnCAN_tx referenced in function _entry_can   can_drv.obj   

Error   3   error LNK2019: unresolved external symbol _fnConfigCAN referenced in function _fnOpenCAN   can_drv.obj   

Error   4   error LNK2019: unresolved external symbol _fnInitCAN referenced in function _fnOpenCAN   can_drv.obj   

The makefile gives the following errors:
Build\Driver.o: In function `fnOpen':
..\..\..\uTasker/Driver.c:160: undefined reference to `fnOpenCAN'

I tried to resolve it but had no luck.
Please help :)

Good news!!! :)

I was playing around more and finally it works.
Actually I cannot tell what did the trick... But I have to comment the PHY check, else it doesn't work.
The next step is getting the debugger to work. Then I can tell you which value was read.

Thank you for putting so much effort in it!

I think when you offer a complete solution with an Eclipse project and debugger support ready-to-go for standard evaluation boards, even more people will try out your great software because they don't have to get their minds too much into it before they can see results. Like me ;)

Have a great day and I'll keep you updated about my project.

I commented the following line:
if ((ulPhyIdentifier & PHY_MASK) != PHY_IDENTIFIER) return;

- no change.

I downloaded the demo bin and uploaded it to the olimex board.
The display is blinking again. I assume that the ip address of the demo file is
I tried to reach it - no answer.

I have the olimex rev b.
I tried another solution with the exact identical network settings (ip, mask, gateway) and it worked. So the hardware is OK!

I deleted the entire flash and tried it again - same result.

In the meantime I could get rid of the blinking by changing the values in app_hw_sam7x.h.
I watched the IP packets in wireshark and I could see the ping tool requesting the mac for the ip, but no one replied. So something isn't running well.

I cannot believe, no one has running µTasker on an Olimex Board?
I don't have the time to go into the deep of µTasker to figure out the problem. I'll have to try another approach.

Thanks for your help and I really hope this can work someday.

Hi Mark,
Thanks für the quick reply.

I copied the new files and had to adapt the makefile to the GNU compiler.

Also there seems to be an error in webInterface.c line 210:
HTTP_session->ptrFileStart = (unsigned char*)cSuccessSW_HTML;
HTTP_session->FileLength = sizeof(cSuccessSW_HTML)-1;

cSuccessSW_HTML is undefined.
I tried to resolve it, but finally I just skip the lines.

After that it compiled smoothly. But the outcome it the same. The display backlight flashes at 2 Hertz and no network communication. Though the network LEDs at the PHY are blinking sometimes.

The VS project won't compile anymore. This is the error I get:

Error   1   error LNK2019: unresolved external symbol "void __cdecl fnDoPortSim(int)" (?fnDoPortSim@@YAXH@Z) referenced in function _WinMain@16   WinSimMain.obj   

Maybe just a little thing, but that takes the most time to find :)

Thanks for your effort!


I also tried to compile µTasker with Eclipse and it worked fine. Some errors came as described but it compiled.
Then I uploaded the bin with SAM-BA to the Olimex SAM7X-EX256 Board. I executed the GPNVM script, quit SAM-BA and reset the Olimex Board. Now the LCD backlight is blinking and the device is not responding.
I am quite sure that all defines are correct and I copied all given files. I am using SP1 (not Rowley, but that makes the same).
I cannot ping the board nor connect with a browser. I deleted my arp cache with arp -d.
When I start the simulation from the same project (Eclipse works in the same directory as VS) it works perfectly.
What to do??
I tried several thing but always with the same outcome.
Mark, do you have an idea or can you send me the bin?


Edit: The cable connection also seems correct. The green led sometimes blinks and the yellow one is on.

Pages: [1]