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

Pages: 1 2 [3]
31
µTasker general / Higher resolution Timers in uTasker simulator
« on: June 07, 2009, 01:49:54 PM »
Hi Mark,

I'm starting to use the utasker simulator to produce standalone simulators that are simulating other parts of my hardware. (Like Modbus slaves etc). This is allowing me to test other parts of my system. One limitiation I'm running into is that lask of support for hardware Timers in the windows simulator, my understanding is that hardware timers are mapped to the basic system tick which I have reduced to 10ms, in config.h

#define TICK_RESOLUTION      10

It seems that the basic windows Tick rate can be easily modified from its default 10ms to 1ms see http://technet.microsoft.com/en-gb/sysinternals/bb897569.aspx I was wondering how easy it would be to modify uTasker so that in its simulator it could support a higher resolution timers, thus approximating the real hardware more closely.

Cheers

Martin

32
Luminary Micro TM LM3SXXXX / Problems trying to Read using IIC
« on: June 04, 2009, 01:23:20 PM »
Hi Mark,

I'm trying to debug some IIC problems. My Hardware has two IIC devices a TC665 Fan controller and a PCF8575 16 bit IO expander, I've added these chips to the Simulator and it all seems to work fine. On the real hardware I have been testing the integrity of the IIC by changing the FAN speed in response to a button push. Using the following Commands

static const unsigned char IIC_WrTC665_FanSlow[] = {0x36, 0x06, 0x00};            // {address, register, data}
static const unsigned char IIC_WrTC665_FanFast[] = {0x36, 0x06, 0x0f};            // {address, register, data}
static const unsigned char IIC_WrTC665_FanSpeed[] = {0x36, 0x07};            // {address, register, data}
static const unsigned char IIC_RdTC665_FanSpeed[] = {2, 0x37, OWN_TASK};            // {address, register, data}
static const unsigned char IIC_Rd8575[] = {2, 0x41, OWN_TASK};            // {bytes, address, TASK_TO_WAKE}
static const unsigned char IIC_Rd8575_1[] = {1, 0x41, OWN_TASK};            // {bytes, address, TASK_TO_WAKE}
static const unsigned char IIC_Rd8575_2[] = {2, 0x41, OWN_TASK};            // {bytes, address, TASK_TO_WAKE}
static const unsigned char IIC_Rd8575_3[] = {3, 0x41, OWN_TASK};            // {bytes, address, TASK_TO_WAKE}
      

I start the IIC interface using the following

static void fnConfigIIC_Interface(void)
{
    IICTABLE tIICParameters;

    tIICParameters.Channel = 0;
    tIICParameters.usSpeed = 100;                                        // 100k
    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) { // open the channel with defined configurations
   fnWrite(IICPortID, (unsigned char *)&IIC_WrTC665_FanSlow, sizeof(IIC_WrTC665_FanSlow)); // set the fan speed
        fnRead(IICPortID, (unsigned char *)&IIC_Rd8575, 0);            // start the read process of 16 bytes
    }
}

I get a write to the Fan as expected, followed by a read from the 8575 chip, but a logic analyser shows 3 bytes being read not 2 as expected.

I can write as much as I want to the Fan chip, but as soon as I try another read of the 8575 chip using fnRead(IICPortID, (unsigned char *)&IIC_Rd8575, 0); only one byte is returned and the IIC bus seems to lock up.

I've documented my findings in the attached document, which has the logic analyser traces.

It seems that uTasker is trying to read 1 more byte than requested, and that only reading 1 byte seems to lockup the IIC driver.

Do you have any thoughts?

Cheers

Martin


33
Hi Mark,

In the spirit of uTasker I've investigated the use of uStrcpy and fnDebugDec and fnBufferHex to remove the need for sprintf to concatinate strings.

I've searched the forum and the manuals for information but dis not find anything, so I've worked it out (I think).
Code: [Select]

static char cDisplayStr[40];     // not sure if this needs to be static or if pointer passed ??
unsigned int uiDecNumber = 123;
unsigned int uiHexNumber = 0xa5;
char *cPtr;
               
cPtr = uStrcpy(cDisplayStr, "Part1");
cPtr = uStrcpy(--cPtr, "Part2"); // decrement cPtr to loose null at end of string
cPtr--;                                                      // Loose Null from end of string
*cPtr++ = ' '; // Add space character to string
cPtr = fnDebugDec(uiDecNumber, 0, --cPtr); // Add a number in DECIMAL format to string
*cPtr++ = '*'; // Add * character to string
cPtr = fnBufferHex(uiHexNumber, (2 | WITH_LEADIN | NO_TERMINATOR), cPtr); // Add a number in HEX format to string, precede with 0x and display 4 hex digits
*cPtr++ = ':'; // Terminate String with : character

Would be the same as             
Code: [Select]
static char cDisplayStr[40];     // not sure if this needs to be static or if pointer passed ??
unsigned int uiDecNumber = 123;
unsigned int uiHexNumber = 0xa5;

sprintf(cDisplayStr, "Part1Part2 %d*%x:", uiDecNumber, uiHexNumber);

Does this make sense, you have to be careful as some functions add terminating nulls and some don't.

Please let me know if there is an easier way to do the above,

Cheers

Martin


34
Luminary Micro TM LM3SXXXX / IO port access in uTasker
« on: March 06, 2009, 01:16:03 AM »
Hi Mark,

Is there a standard way to access / configure IO ports in uTasker, I have noticed some functions in debug.c like fnSetPort and fnInitialisePorts but cannot find any documentation on them. Should I modify these or have you defined a standard set of functions within uTasker for I/O port coonfiguration and access?

Cheers

Martin

35
Luminary Micro TM LM3SXXXX / Using The Serial Port in uTasker
« on: February 24, 2009, 03:04:28 PM »
Hi Mark,

I'm evaluating various sections of the uTasker project, and I'm now looking at the serial ports.

I would like to use all three ports on an LM3S6965 for my own use,

Port 1 - connected via USB serial chip to a PC (115200baud)
Port 2 - connected via half duplex RS485 to a modbus device (115200baud)
Port 3 - Connected full duplex to a Crystalfontz RS232 display (19200baud)

I'm a bit confused how to setup the serial ports, what I don't want is to have the demo telnet menu apearing on one of the ports.

What I want to do is have all tree serial ports free for me to use, and debug output redirected via the Telnet interface, I like the idea of "debug printf's" going via Telnet. And lastly I don't want the normal Telnet menu at all.

What defines do I need to do the above?

Cheers

Martin

36
Luminary Micro TM LM3SXXXX / Using The Bootloader with Luminary Micro Chips
« on: February 24, 2009, 02:41:46 PM »
Hi Mark,

I've just tested the boot loader, and worked out how to use it. I downloaded the generated "z_Upload.bin" file by ftp. And rebooted and the new software was flashed and verified to be running.

I then connected via ftp again and say the "z_Upload.bin" file, does this mean the next time the board is rebooted it will flash the code again? or is the file flagged some how as being used. Does the user need to delete this file from the file system?

Under the server option in FileZilla you can enter custom FTP commands, this would be a great way to handle an addition "RESET" command that would force a reboot and reprogram of the target, without having to do a power down.

Cheers

Martin

37
Hi Mark,

After getting the uTasker working correctly in a simulated environment I have turned my sights to getting uTasker working on real hardware.

I'm using an LM3S6965revc development board from Luminary Micro. I'm also using Rowley Crossworks V1.7 build 16.

I can compile the software and produce a bin file which I can then download to the target board using the Luminary Jtag flash programming software, this works fine.

The problem comes when I try to compile and debug uTasker within the Crossworks environment, I get a number of problems that makes me think there are problems with the uTasker13.hzp project file.

As a reference I'm also compiling the LWIP web server application from the from the luminary micro driver library, this proves my Rowley install is working and that JTAG downloading from the rowley IDE works.

I'm using Rowley with both their Crossconnect JTAG programmer (upgraded to the latest firmware) and the Luminary Micro Built in JTAG programmer, and I get the same problems using either.

My problems are

1. If I "Build and Run", or "Build and Debug" the uTasker project, I cannot even get Rowley to download the file without verification errors. I suspect that the Rowley may be using the wrong loader file.

2. If I use the Rowley memory usage display CTRL ALT Z then it gives me no indication of the SRAM used, again this makes me think the project file is not setup correctly.

Have you tried debugging within the Rowley environment? with your supplied project file?

In an effort to get to the bottom of the above problems I created a new project and did the following things.
1. Added all the files to it,
2. Set the two defines _LM3SXXXX and _GNU in the common project properties
3. Added ..\..\..\Applications\uTaskerV1.3. to the common user include directories
4. Set optimisation to "optimise for size"
5. As this new build was using the Rowley start-up code I added a define  "#define _main main" in line 55 of LM3Sxxxx.c. The Rowley start-up code looks for "main".

The above now compiles and downloads correctly via either JTAG adapter, which is an improvement, this seems to imply that there is a problem with the target setup of the supplied project file.

Although the code downloads it does not run correctly, I suspect because of a problem with the interrupt vectors or the fact that Rowley start-up code is being used and probably no reference is being made to the uTaskerLM3SXXXX.ld file. I'm still not sure how the low level side of uTasker works but I'll try and investigate further.

I've attached a copy of my project file to this post.

I'd appreciate your thoughts on the above.

Cheers

Martin

38
µTasker general / Porting UTasker to the Rabbit Processor
« on: May 21, 2008, 02:10:13 PM »
Hi Mark,

Partly in an exercise to understand utasker in more depth I would like to look at the possibility of Porting uTasker to the Rabbit Processor. Specifically the Rabbit 3000 processor on the RCM3200 board, which uses an ASIX chip for Ethernet access.

We currently use these RCM3200 modules in some of our products, see www.rabbitsemiconductor.com

We use the Softools C compiler www.softools.com which is an ANSI C compiler so that part should be OK. Much better that the Dynamic C compiler supplied by Rabbit / DIGI.

The Rabbit is basically an 8bit device which uses paged memory to access up to 1M of memory. The RCM3200 module has 512K Flash and 512K Ram. The fact that the rabbit is limited to 64K memory, without paging and that uTasker supports small memory sizes looks like it might be a good fit.

My first question is do you mind if I have a play with this, I am currently evaluating the LPC23xx and LM3Sxxxx versions of uTasker and have merged the two stacks. Would one of these make a good basis to start from or would you look at something like the N64 version as a starting point, I presume the stacks are the same and just the hardware specific files are different.

Cheers

Martin Honeywill

39
µTasker general / How do you Create Dynamic WEB pages
« on: February 29, 2008, 04:18:05 PM »
Hi Mark,

Do you have a document available detailing how to create dynamic web pages in utasker, i.e. how to create pages with buttons that do things and also dynamically feedback information to the user. I've looked through the forums and the online documents, but have not found anything yet.

Cheers

Martin

40
µTasker general / Using uTasker in Real applications
« on: January 31, 2008, 01:06:58 PM »
Hi Mark,

I've been playing with uTasker for the LPC23xx on and off for a week or so and I'm starting to get my head around it. I've been enabling and disabling features in config.h to see what depends on what. I've also added a simple UDP handler for a protocol I used on a previous project, so I could see if the uTasker Simulator would talk to my PC based application.

To date all this playing has been based on your demo application, what I'm trying to do now is to remove features that I don't need to come up with a skeleton framework. I'm finding it quite difficult to tease this apart, to find what is related to what, and what is needed by what. I was wondering do you have sample applications that are standalone like a simple static page webserver, or UDP server. This way I can build up from one of those rather than trying to cut down the demo application by removing bits.

Cheers

Martin

41
I'm a NXP LPC chip user and am very interested in looking at the uTasker TCPIP stack for the LPC23xx, do you have any time scales for its release? even in beta form.

My IDE is the GCC based Rowley Crossworks.

Do you have any detailed information about how your stack works, other options I'm looking at are UIP and LWIP and I'm interested in the features / limitations of your stack.

Thanks for what looks like a very interesting product

Martin Honeywill

Pages: 1 2 [3]