Author Topic: New Service Pack SP5 release  (Read 13151 times)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
New Service Pack SP5 release
« on: August 28, 2007, 12:12:57 AM »
Hi All

Here's an anouncement of a new service pack available for the M5223X project. It is SP5 and includes not only the promised SPI FLASH software upload support but has also SW encryption upload support to enable SW to be distributed and loaded without it being interpretable.

There are new documents detailing the operation and use of the new boot loader version, plus an updated totorial about using it with the M5223X and CodeWarrior.

http://www.utasker.com/docs/uTasker/uTaskerBoot_003.PDF
and
http://www.utasker.com/docs/uTasker/BM-Booloader_for_M5223X.PDF
respectively.

A circuit for connecting an ATMEL AT45DBXXX to typical M5223X boards can be found here:
http://www.utasker.com/docs/uTasker/spi_flash_freescale.PDF

Along side various other improvements, there is an exciting new HTTP serving technique included in the new project which allows much faster serving of larger pages and images. This uses a special TCP windowing technique which requires just 6 more bytes of RAM per TCP socket but achieves around 25x speed improvement in a local area network. Activate it and you will see what I mean...!

Then there is complete RTC and edge port (IRQ1..15) support and simulation. And to round it off, it includes all required for GCC and Eclipse builds with the latest CodeSourcery GCC versions.

Below is a copy of the new part of the release note. You will notice two restrictions (fairly minor) which will be looked into... but if anyone is feeling really industrious then why not have a go at solving the puzzle and give us the details here!

The SP5 is available on the Service Pack side (http://www.utasker.com/software/softwareV1.3.html) and can be extracted using the normal technique and M5223X project password.

Good luck. I hope you enjoy the new features!

Regards

Mark


28.8.2007 SP5


uTasker:
- uFile.c         SPI FLASH support
- iic_drv.c       Removed GNU warning
- Driver.c        uStrlen() const type to match prototype
                  Use static RAM for code from RAM since uMalloc may not always be ready
- uNetwork.c      Add next rx acknowledgement count to ensure correct order of received acks
                  Sequence number correction on sequence count overflow
- uTasker.c       Timer delays of less than 1 TICK rounded up to 1 so that they will not be lost
                  Timer entries use enabled flag to ensure validity
- uTasker.h       enabled flag added to Timer table


WinSim:
- FileToDisk.c    Add SPI FLASH support
- WinSim.h        Add fnInitSPI_DataFlash(), fnGetDataFlashStart(), fnGetDataFlashSize() and fnSimAT45DBXXX()
- WinSim.c        Added SPI Data FLASH to support the AT45DBXXX. Set initialised flag.

Hardware:
- M5223X\M5223X_boot.c   SPI FLASH support added
- M5223X\mcf5223X_boot.s Added adjustment for boot loader with external SPI FLASH
- M5223X\SimM5223X.h     Add Edge port module registers and Add RTC registers / correct M5223X_QSPI content size
- M5223X\M5232XSim.c     Correct IRQ simulation on user port changes and improve level sensitive simulation - for IRQ1..IRQ7
                         Correct DD, GP and AN port function simulation
                         Add RTC support
                         User memset rather than uMemset since uMemset is not yet available when running from SRAM
- M5223x\M5223X.h        Add Edge port module 1 registers and interrupt masks.
                         Add RTC registers and extend the RTC setup to use it.
- M5223X\M5223X.c        IRQ support extended to IRQ1..15 (11 for 80 pin device)
                         All calls of fnIncrementEthernetStats made conditional on USE_IP_STATS
                         Add SPI FLASH support
                         Add RTC support
                         Rework auto-negotiation mode to control full-duplex mode in PHY
                         Alternative UART pins defines. Alternative forced for UART2 when 80 pin package used
                         Correct I2C  mult-read sequence
- Hardware.h      Add fnSPI_Flash_available() and fnConfigureRTC()

Stack:
- arp.c           Optionally only add used addresses to ARP table (rather than all 'seen' ones) - add define
                    ARP_IGNORE_FOREIGN_ENTRIES to IP configuration (config.h) to activate this
- ip.c            Use static RAM for code from RAM since uMalloc may not always be ready
- webutils.c      Allow displaying short strings (less than 4 bytes) without inserting spaces (improves formular field

inputs) - add define INSERT_SHORT_STRINGS to HTTP configuration (config.h) to activate this
- tcpip.h         ucNegotiate no longer conditional on Telnet
                  Add HTTP windowing tx support (HTTP_WINDOWING_BUFFERS)
- tcp.c           Add HTTP windowing tx support (HTTP_WINDOWING_BUFFERS)
                  Discard buffered TCP data when no connection
                  Optionally silently discard peer's data when closing (DISCARD_DATA_WHILE_CLOSING)
- http.c          Correct message regeneration in delayed serving state
                  Add HTTP windowing tx support (HTTP_WINDOWING_BUFFERS)
                  allow displaying short strings (less than 4 bytes) without inserting spaces (improves formular field

inputs) (INSERT_SHORT_STRINGS)


Demo application \Application\uTaskerV1.3
- application.c   Add IRQ test (M5223X)
                  Add RTC test (M5223X)
- app_hw_m5223x.h Add RTC configuration


Demo application CodeWarrior project:
- \Applications\uTaskerV1.3\CodeWarrior_M5223X\uTaskerV1.3\include\mwerks.h modified to force function pointers in A0 to be

compatible with libraries.
- \Applications\uTaskerV1.3\CodeWarrior_M5223X\uTaskerV1.3\bin\uTaskerConvert.exe New version of binary converter supporting

encryption and Motorola binary input files

Demo application GNU/Eclipse project:
- \Applications\uTaskerV1.3\GNU_ColdFire\Build_M5223X.bat  uses same make file as Eclipse
- \Applications\uTaskerV1.3\GNU_ColdFire\m52235evb-rom.ld  supports all present CodeSourcery versions
- \Applications\uTaskerV1.3\GNU_ColdFire\makefile supports make file for use with GNU standalone and Eclipse builds

                 


uTasker boot loader project \Applications\uTaskerBoot:
- config.h               Add M5223X SPI FLASH support - activate define SPI_SW_UPLOAD to enable SPI FLASH support
- uTaskerBootLoader.c    Changed header interpretation so that it is endian-independent
                         Added decryption support
                         Added SPI FLASH support (M5223X)
-\Applications\uTaskerV1.3\CodeWarrior_M5223X\uTaskerV1.3\cfg\M52235_BOOT_APP_FLASH.lcf to support SPI FLASH based upload


Configuration notes:
1. The define RUN_LOOPS_IN_RAM is not supported in the SP5 under CodeWarrior. The reason is that the compiler won't accept

the method of calcualting the code space when changing from malloc based to static RAM space, which is required due to new

start-up requirements. The advantages of the loops in RAM are minor and DMA_MEMCPY_SET is recommended. Methods of solving

this restrictions will be investigated.

2. INSERT_SHORT_STRINGS
Add the following line to config.h, in the USE_HTTP block, to activate this:
            #define INSERT_SHORT_STRINGS                                 // allow displaying short strings (less than 4

bytes) without inserting spaces (improves formular field inputs)
This is recommeded when working with formulars to avoid short strings being padded with spaces.

3. HTTP_WINDOWING_BUFFERS
Add the following line to config.h, in the USE_HTTP block, to activate this:
            #define HTTP_WINDOWING_BUFFERS  2                            // we can send 2 frames before requiring ACKs
When activated it introduces a new method of using TCP windowing when the HTTP server sends data. The increased memory

requirement is quite small at 6 bytes per TCP socket but allows all HTTP data, including dynamically generate data to be

sent at much improved speed to the HTTP client.
The basic problems when no windowing is used are round-trip delay and delayed-acks at the client. the new solution enables

regeneration of all data without the need to store in large buffers, while respecting the receive winodw of slow clients -

inlcuding a persistent timer to probe a closed window. In a local network a speed improvement of around 25x is obtained,

which is especially useful when serving larger pages and images!
This technique has not yet been intensively tested so if any problems are found please report them. By removing the define

the original technique is returned.

Note that this requires also CONTROL_WINDOW_SIZE and SUPPORT_PEER_WINDOW to be active (which is generally already the case).


4. IRQ
The simulator has been improved to accurately simulate all edge interrupts.
See the new IRQ_TEST in application.c. Activate also the serial debug interface (SERIAL_INTERFACE) to see messages when the

IRQ interrupts are triggered.

5. RTC
The RTC is activated per default (it can be completely deactivated by removing SUPPORT_RTC from app_hw_m5223x.h).
For an example of configuration and use see RTC_TEST in application.c
The RTC is also fully simulated.

6. GCC Eclipse
The GCC directory is included in the SP5 with the Eclipse make file.
See the following forum topic for details of how to set up Eclipse:
http://www.utasker.com/forum/index.php?topic=14.0

7. Encrypted SW upload
The boot loader project now suppports uploads of encrypted data. Full details of using this with the M5223X project is

included in the newest version of the bare-minimum users' guide for the M5233X - see

http://www.utasker.com/docs/documentation.html.
The updated converter utility uTaskerConvert.exe to support the encryption is included in the SP5 - to check the version

number it can be called with "uTaskerConvert.exe -v", which returns:
 uTaskerConvert V1.1 - supporting encryption and Motorola binary format


8. SPI FLASH SW uploads
By adding the following define in the M5223X section of config.h, the external SPI FLASH (supporting ATMEL AT45DBXXX

devices) is activated:
  //#define SPI_SW_UPLOAD                                                // SW upload to SPI FLASH support enabled

The following new defines in app_hw_m5223x.h define the properties of the SPI FLASH and define a file name used by the HTTP post method on the application web side to be loaded to it:

#define SPI_FLASH_PAGE_LENGTH 264                                        // standard page size (B-device only allows 256)
//#define SPI_FLASH_PAGE_LENGTH 256                                      // size when power of 2 mode selected (only

possible on D-device)
#define SPI_FLASH_BLOCK_LENGTH (8*SPI_FLASH_PAGE_LENGTH)                 // block size - a block can be deleted
#define SPI_FLASH_SECTOR_LENGTH (64*4*SPI_FLASH_PAGE_LENGTH)             // exception sector 0a is 2k and sector 0b is 62k
#define SPI_FLASH_PAGES         1024                                     // 256k part expected
#define SPI_DATA_FLASH_SIZE    (SPI_FLASH_PAGES*SPI_FLASH_PAGE_LENGTH)

#define SW_UPLOAD_FILE()       (*ucIp_Data == 'H') && (*(ucIp_Data+1) == 'S') && (*(ucIp_Data+2) == '.')  &&  (fnSPI_Flash_available() != 0)

Should the device not be detected, the upload will go to the internal FLASH as in the previous version, even if the new  option is enabled.

See the latest edition of the bare-minimum users' guide for the M5233X for full details about setting up the boot program.
Note that the boot loader space requirement increases from 2k to 4k when using external SPI FLASH due to the fact that it requires both the original flash driver and also the new SPI flash driver at the same time. The size fo uploadable code  however increases to maximum internal FLASH size minus 4k.

Although the uploaded file is never visible in the file system, its contents can be recovered using FTP under DOS and the  "GET HS.bin" command.

There is presently one restriction when using SPI_SW_UPLOAD support. The define DMA_MEMCPY_SET (in app_hw_m5223x.h) has to be deactivated. The reason is not yet understood but the DMA copies cause an exception to occur when the SPI FLASH support is operation. This doesn't happen when stepping with the debugger but does when the code runs at full speed - making it more difficult to debug. Hopefully a solution will be found in the near future...


« Last Edit: August 28, 2007, 12:00:33 PM by mark »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: New Service Pack SP5 release
« Reply #1 on: August 28, 2007, 07:57:41 PM »
Hi All

As with any new SW, some issues will be found only once it has been released...

So please report anything here and I will also use it to report any (hopefully) relative simply modifications which can be made to correct them. [All corrections will be integrated in subsequent SP or file updates].

So to get the ball rolling...

1. 28.8.2007: RTC demo when compiling with GCC
The interrupt needs to be defined differently for GCC use and so it crashes when the first minute interrupt arrives.
Correction is to add the following lines to m5223x.c somewhere in the middle of the  #ifdef _GNU  // GNU interrupt list (approx. line 71)

Code: [Select]
        #ifdef SUPPORT_RTC
            static void _rtc_handler(void) __attribute__((interrupt_handler));
        #endif



2. 30.8.2007: TCP counter reset when using new HTTP windowing
I have had chance to start intensive tests with the new HTTP windowing method (mainly simulating error cases and checking that the handling is correct)
It is not looking bad but there will be some corrections and optimisations needed before using it in a production project.
There is one nasty little bug which is worth fixing because it can cause the HTTP socket to remain in a blocked condition if a connection is reset by the client as a consequence of other possible less-serious problems.

In TCP.c add the following in the TCP_STATE_LISTEN state
Code: [Select]
#ifdef HTTP_WINDOWING_BUFFERS
                  ptr_TCP->usOpenCnt = 0;                             
#endif
just after the line   ptr_TCP->ucTCPInternalFlags = 0;                       // start with flags cleared (at about line 1195)

3. 30.8.2007 Boot loader binary conversion utility
As pointed out by 'Kremer', the CodeWarrior version 6.4 seesm to produce binary files in Motorola binary format rather than raw binary format. See
http://www.utasker.com/forum/index.php?topic=36.msg155#msg155

For this reason the new version of uTaskerConvert.exe recognised Motorola Binary files and converts them to an intermediate RAW binary format so that this should be of no concern to the user.
Kremer pointed out an error which I made which could (or better - would) cause a block to be filled with 0xff and result in failure. This has now been corrected and the new converter can be collected from :
http://www.uTasker.com/software/V1.3/uTaskerConvertV1.2.zip

Calling with "uTaskerConvert.exe -v" will return the version number to verify the correct one.


4. 4.9.2007 FLASHBAR value with SPI FLASH bootloader support
When the SPI FLASH boot loader support is used, the start address of the application is 0x1000 rather than 0x800. This is defined in the linker script file M52235EVB_BOOT_APP_FLASH.lcf but has side effects when the program entry is higher than 0x800 due to the fact that the value is set to reserved bits in the FLASHBAR - this can have serious consequences and was found to be the cause of the FLASH -> RAM DMA difficulty noted in the SP5 release notes (as well as others).

hardware\M5223x\startup.s should be modified as follows

    /* Initialize FLASHBAR */
/*  move.l  #__FLASH,d0                         don't take from linker script because it is incorrect  */

/*  move.l   #0x121,d0   */                     /* No workaround 1 {1} set value assuming FLASH is at low address */
    move.l   #0x161,d0                          /* This is the workaround 1 due to the Internal FLASH Speculation error in the first devices */

    movec   d0,RAMBAR0

After this correction has been made, the conditional use of DMA_MEMCPY_SET in app_hw_m5223x.h can be removed.


5. 5.9.2007 IRQ8..IRQ15 mask correction
Thanks to Neil D. for pointing out an error in the IRQ8..15 edge port configuration which was stopping the interrupts from being serviced. This was a surprise because I did believe that all had been check, but this can not have been the case!

If you need to use these IRQs (the IRQ1..IRQ7 are fine) please make the following code corrections.
- in m5223x.h add the following define:
#define IRQ_ICR_8_15_START  (unsigned char *)(INT_CTRL_1_ADD + 0x60)
Place it just before the definition of IC_ICR_1_32 at about line 787. This address is used to set up the interrupt level.

- in M5223x.c make the following code change in the routine fnConfigureInterrupt() and case PORT_INTERRUPT
Use this
Code: [Select]
                irq_ctl = IRQ_ICR_8_15_START + ucIRQ_bit;
                *irq_ctl = ((((INTERRUPT_SETUP *)ptrSettings)->int_priority & ~PRIORITY_MASK) | INTERRUPT_MID_POINT_PRIORITY); // define level with Mid-Point priority for this interrupt
                IC_IMRL_1 &= ~(MASK_ALL_INT);                            // ensure global mask removed
                IC_IMRH_1 &= ~(IRQ8_PIF_INT_H << ucIRQ_bit);             // unmask interrupt source 
instead of this
Code: [Select]
#ifdef CHIP_80_PIN
                irq_ctl += (EDGE_INTERRUPTS-1);
#else
                irq_ctl += ucIRQ_bit + 8;
#endif
                *irq_ctl = ((((INTERRUPT_SETUP *)ptrSettings)->int_priority & ~PRIORITY_MASK) | INTERRUPT_MID_POINT_PRIORITY); // define level with Mid-Point priority for this interrupt
                IC_IMRH_1 &= ~((IRQ8_PIF_INT_H << (ucIRQ_bit - 1)) | MASK_ALL_INT); // unmask interrupt source

The interrupts were not arriving due to the fact that they were not being unmasked correctly and also the interrupt priority was being set in the wrong controller (0 rather than 1).
After making the change IRQ8..IRQ15 will operate correctly - hand on heart - I just tested it on the M52235EVB. Note that if you use the 80 pin (as is on the M52233DEMO) it only actually has IRQ11 available in the second Edge port block.


6. 7.9.2007 SPI_FILE_SYSTEM support
If you would like to use the external EEPROM based file system in the SP5 there are a couple of small mods to make so that the compiler doesn't complain. Note too that SPI_SW_UPLOAD can not be used together with SPI_FILE_SYSTEM.

In M5223X.c:
1. Correct the line #elif SPI_FILE_SYSTEM (invalid syntax) to #elif defined SPI_FILE_SYSTEM (about line number 2110)
2. Declare the function int fnWriteBytesEEPROM() (about line 2125) as a static function static int fnWriteBytesEEPROM()


7. 10.9.2007 I2C interrupt
There was a small improvement made to the I2C interrupt routine which allows several reads and writes to be successfully queued in the driver. But it has been found that the modification was not made correctly and the code leaves the processor interrupts blocked after a complete message has been sent.
The correction is in M5223x.c, static __interrupt__ void _IIC_Interrupt(void)

Just before the return; in the middle of the interrupt service routine add
        iInterruptLevel--;    at about line 2560

8. 12.9.2007 SPI FLASH power up delay
It has been found that the SPI FLASH (AT45DBxxxx) requires a delay of at least 20ms from the time the system power reaches its minimum operating level until the device is ready for use. In circuits with an external watchdog - usually generating a reset pulse on power up of around 150ms - the Coldfire will not try to access the device until after this time and so all is OK.
However the M5223X often uses its internal reset circuitry, which means that the processor starts operating within around 1ms of the system supply voltage reaching ats lowest operating level. This causes difficulties on power up (but not on subsequent resets) when operating with the external SPI FLASH.
The solution is to add start up delays to the projects with SPI FLASH; the uTasker demo project and also the bootloader when supporting the chip. This then ensures that the device is always correctly detected on power up as well as normal reset.

The changes to make are:
- in M5223x.c, in the routine fnCheckAT45dbxxx() add (at the beginning of the routine after the line 'volatile unsigned char ucID[4];')

    volatile unsigned long ulDelay = (BUS_CLOCK/12000) * 25;             // 25ms start up delay
    while (ulDelay--) {};                                                // Start up delay to ensure SPI FLASH ready

The factor BUS_CLOCK/12000 is an empiric value which ensures a delay in ms for any clock rate the project will be using.

- in M5223X_boot.c [when using the SPI FLASH capability of the boot loader], in the routine fnCheckAT45dbxxx() add (at the beginning of the routine after the line 'volatile unsigned char ucID[4];')

    volatile unsigned long ulDelay = (OSCCLK/10000)) * 25;             // 25ms start up delay
    while (ulDelay--) {};                                                // Start up delay to ensure SPI FLASH ready

The factor OSCCLK/10000 is an empiric value to obtain a delay in ms since the boot loader runs at the oscillator rate (doesn't set PLL).


9. 12.9.2007 UART Status register declaration
This is in fact not an error introduced in the SP5 but something which has always been 'not-quite-correct...'.
Depending on the compiler and its optimisation settings, it is possible for registers to not be polled as expected if they are not declared as being of 'volatile' nature.
Therefore all registers which require this characteristic are declaration so... except for the UART status registers.
So please make the following changes in M5223x.h.
USR_UCSR_0 *(volatile unsigned char *)(UART_ADD + 0xXX)
USR_UCSR_1 *(volatile unsigned char *)(UART_ADD + 0xXX)
USR_UCSR_2 *(volatile unsigned char *)(UART_ADD + 0xXX)

This will ensure that a new compiler version doesn't suddenly optimise an important loop aways.
Ooops. Sorry about that.


10. 10.10.2007 LCD in 4 bit mode
When working with an LCD in 4 bit mode the following corrections are needed to ensure that LCD reading and bus timing is always correct.
In app_hw_m5223x.h add teh following new macro to the LCD macro block
#define DELAY_ENABLE_CLOCK_HIGH() O_CONTROL_PORT_DAT &= ~(O_CONTROL_EN);

In lcd.c add the delay between reading two nibbles (at aroudn line 198):
    DELAY_ENABLE_CLOCK_HIGH();                                           // ensure the second write is not too fast when in 4 but mode
    // since we are in 4 bit mode we must repeat clocking to ensure read completed
    CLOCK_EN_HIGH();

In the same routine (fnReadDisplay()), reverse the nibble shift directions in the two places that it occurs:

#if DATA_SHIFT_LEFT > 0
    RdData_msb >>= DATA_SHIFT_LEFT;                                      // shift into position
#elif DATA_SHIFT_RIGHT > 0
    RdData_msb <<= DATA_SHIFT_RIGHT;                                     // shift into position
#endif

and finally... (in the same routine) the nibble shift direction:

   return ((unsigned char)(RdData_msb | (RdData_lsb >> 4)));             // return the data byte read


11. 13.11.2007 Failing mono-stable task timer (usually Watchdog task)
I must apologise to A.T. who found this bug. It is new in the SP5 and appears when there is a task in the task table defined to use NO non-stable timers (neither has a delay, nor a repetition, nor a reserved timer). In this case it is incorrectly counted and the result is that the start of the timer list gets shifted, effectively losing the first timer resource (belonging usually to the watchdog task).

In the simulator this immediately leads to the watchdog firing and the simulator terminating. On the target the watchdog LED doesn't blink and the watchdog will fire after 2s (if not disabled).

The fix is not difficult but does require a chunk of code to be replaced.
In uTasker.c search for the following line of code in uTaskerStart() and replace the content as follows:

if (nr_of_timers) {
...
}


Code: [Select]
        if (nr_of_timers) {
            tTimerList = (TTIMETABLE*)uMalloc((MAX_MALLOC)(nr_of_timers * sizeof(TTIMETABLE) + sizeof(tTimerList->ptTaskEntry)));  // get exact required timer list space

            ptFillTable = tTaskTable;                                    // establish initial timer list
            while ( ptFillTable->pcTaskName ) {                          // start at top and work down to bottom
                int iTimerEntryValid = 0;                                // {7}
                if ( ptFillTable->TaskDelay != 0 ) {                     // delayed start required
                    if (NO_DELAY_RESERVE_MONO == ptFillTable->TaskDelay) { // place holder only so remove the delay
                        ptFillTable->TaskDelay = 0;
                    }
                    tTimerList->taskDelay = ptFillTable->TaskDelay;
                  //tTimerList->ptTaskEntry = ptFillTable;               // {6}
                  //tTimerList++;
                    iTimerEntryValid = 1;                                // {7}
                }
                else if ( ptFillTable->TaskRepetition != 0 ) {           // no start delay but repetition
                    tTimerList->taskDelay = ptFillTable->TaskRepetition;
                  //tTimerList->ptTaskEntry = ptFillTable;               // {6}
                  //tTimerList++;
                    iTimerEntryValid = 1;                                // {7}
                }
                if (tTimerList->taskDelay != 0) {
                    tTimerList->ucTimerEnabled = 1;                      // mark that the timer is active {6}
                }
                if (iTimerEntryValid != 0) {                             // {7}
                    tTimerList->ptTaskEntry = ptFillTable;               // enter the function
                    tTimerList++;
                }
                ptFillTable++;
            }
          //tTimerList->ptTaskEntry = 0;                                 // end of table (uMalloc returns zeroed memory)
            tTimerList -= nr_of_timers;
        }

The comment {7} indicates the lines which are different.

Fortunately the bug is very obvious in the simulator. If you don't experience it it means that you have no tasks without timers. If you do experience it, replacing the code above will sort it out.


12. 30.11.2007 UARTs 1 and 2 in simulator
The serial interface demo uses UART0 by default. This can be changed in app_hw_m5223x.h for either UART1 or 2 if desired. Eg. #define DEMO_UART        1

A correction in the simulator is however also necessary to be able to map these to the PC COM ports. Please make the following changes to the argv[] array index to correctly match the interface.

In M5232XSim.c,

extern unsigned long fnSimInts(char *argv[]) {
...
            if (iInts & CHANNEL_0_SERIAL_INT) {
                ptrCnt = (int *)argv[0];                         <- OK
...

            if (iInts & CHANNEL_1_SERIAL_INT) {
                ptrCnt = (int *)argv[1];                         <- set 1
....
            if (iInts & CHANNEL_2_SERIAL_INT) {
                ptrCnt = (int *)argv[2];                         <- set 2
....
}

Note also that if support for DMA on the UARTs is enabled, only UART0 and UART2 support DMA transmission (UART1 can support DMA reception but is not used like this in the demo project). Don't configure UART1 to use DMA on transmission (eg. tInterfaceParameters.ucDMAConfig = 0;)

13. 21.01.2008 Stopped GlobalMonoTimer can cause other timer to fire too early
Please see the following for details about this one and the patch.

http://www.utasker.com/forum/index.php?topic=158.0


14. 26.01.2008 FLASH state-machine clock frequency (FCLK) correction
Please see the following for details about this one and the patch.

http://www.utasker.com/forum/index.php?topic=165.0


Regards

Mark

« Last Edit: January 26, 2008, 09:18:24 PM by mark »