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 - hervé

Pages: 1 ... 4 5 [6] 7
76
µTasker general / fnSendBufTCP problem
« on: January 08, 2010, 10:17:19 AM »
In fact fnSendBufTCP allocate space in memory for the buffer with uMalloc which cannot be freed.
My application is a TCP Client connecting to a TCP server.
Each time the connection got problem, it is closed then opened again :

Code: [Select]
case GIP_OPEN_REQUESTED:
tGIP_TCP_socket = fnTCP_close(GIP_TCP_socket);
fnReleaseTCP_Socket(GIP_TCP_socket);                                    // release existing connection
if ((GIP_TCP_socket = fnGetTCP_Socket(TOS_MINIMISE_DELAY, TCP_NO_TIMEOUT, fnGIPListener)) >= 0) {
ucGIP_RxState = GIP_STATE_OPENED;
} // if
uTaskerStateChange(OWN_TASK, UTASKER_ACTIVATE);
break;

It looks like further fnSendBufTCP calls will consume memory.
Does this means this function could not be used with dynamically created Socket ?

77
µTasker general / fnSendBufTCP
« on: January 08, 2010, 09:23:25 AM »
Looking at different topic on the subject, specially http://www.utasker.com/forum/index.php?topic=486.0 which is very interresting, I wanted to use fnSendBufTCP.
But when I put it in my application, I got an exception error inside fnCheckTelnetBinaryTx() function with the simulator, as fnGetTelnetSession()returns a zero-pointer ....

Code: [Select]
extern int fnCheckTelnetBinaryTx(USOCKET Socket)
{
TELNET *TELNET_session = fnGetTelnetSession(Socket);

    if (TELNET_session->usTelnetMode & (TELNET_STUFF_TX_IAC | TELNET_BINARY_MODE)) {
        return 1;
    }
    return 0;
}

So I changed it to :

Code: [Select]
extern int fnCheckTelnetBinaryTx(USOCKET Socket)
{
TELNET *TELNET_session = fnGetTelnetSession(Socket);

    if (TELNET_session == 0)
        return 0;
    if (TELNET_session->usTelnetMode & (TELNET_STUFF_TX_IAC | TELNET_BINARY_MODE)) {
        return 1;
    }
    return 0;
}

78
µTasker general / Re: VLAN
« on: January 07, 2010, 03:44:38 PM »
Thanks for your comments

79
µTasker general / VLAN
« on: January 06, 2010, 03:57:14 PM »
Hello Mark,

I activated the SUPPORT_VLAN but got the following errors :

Code: [Select]
.\ObjectFiles\TGIP_BM.axf: Error: L6218E: Undefined symbol vlan_active (referred from ethernet.o).
.\ObjectFiles\TGIP_BM.axf: Error: L6218E: Undefined symbol vlan_vid (referred from ethernet.o).

It looks like some files are missing, isn't it?

80
NXPTM LPC2XXX and LPC17XX / Re: boot loader support in LPC2388
« on: December 15, 2009, 02:11:30 PM »
Hi Mark,

Thanks for your comment.
I looked at the project uTaskerV1.4_BM, the only difference I saw was the start address of IROM1 set to 0x1000.
On the linker tab R/O Base was set to 0 : I set the "Use Memory Layout from Target Dialog" so now my code start at 0x1000 with no other code before.

In fact it looks like the bootloader and the application are completely independent programs ??

If I correctly understood the purpose, this project can only be uploaded, then ran from bootloader.
So starting from 0x1000, the stacks and heap can be initialized again to fit the application needs....
But what about the reset or abort handler table? The code will jump to bootloader one, not to application handler, no ?

What about using the simulator with the bootloader, I didn't see any specific configuration ?

81
utFAT / Re: utFAT - preliminary information
« on: December 15, 2009, 09:01:34 AM »
Hi Mark,
It looks nice.
Do you plan to allow simultaneous access to a file (one write access with multiple read access)?
Do you have a pre-release available at this time?

82
NXPTM LPC2XXX and LPC17XX / Re: boot loader support in LPC2388
« on: December 14, 2009, 10:25:08 AM »
On the same subject, I want to use flash SPI for boat loader.
I supposed I need to add lpc23xx.c to the uTaskerBootLoader project, but most function are static on this file.
What is the correct way ? Do I change them to be public ?

I didn't find how to compile my project for bare minimum compatibilty (with Keil)
Looking on my map file I saw that a lot of functions are located at start of memory (printf,libinit...)
How can I have my project removing the boot loader part, with stack initialization, and so on ?

83
µTasker general / Re: PPP
« on: November 27, 2009, 09:29:05 AM »
Hello Mark,

In fact I don't have the same problem with the simulator, only with my board...
I will invistigate...

84
µTasker general / PPP
« on: November 25, 2009, 05:51:26 PM »
Hello,

I wanted to test ppp.c

First-----------
I set DEMO_UART either to 2 or  3
Then I got some stop when I put some breakpoint either on
static __interrupt void SCI2_Interrupt(void)
or on
static __interrupt void SCI3_Interrupt(void)

So my hardware is working and I can use both UART....

Second-----------
Now I define USE_PPP
and  set PPP_UART to 2  to test the PPP part....

I got an error because DCE_MODE is not defined on
tInterfaceParameters.Config = (CHAR_8 + NO_PARITY + ONE_STOP /*+ USE_XON_OFF*/ + CHAR_MODE + DCE_MODE);
I suppressed it(DCE_MODE) to compile with no error...

The problem is that I never got an interruption on
static __interrupt void SCI2_Interrupt(void) !!!

When I look at the definition of UART2 and UART3 , they are identical except baudrate : Normal  !
One gave interrupts, not the other : do you have an idea why there was no breakpoint stop on the corresponding interrupt, when defined by PPP.

PS: I checked the Vector Interrupt Controller and saw both UART2 and UART3 were enabled : Normal !


85
NXPTM LPC2XXX and LPC17XX / ADC Simulation
« on: November 19, 2009, 09:17:18 AM »
Hello,

On my release I didn't find the simulator structure for ADC on simLPC23XX.h, is it normal?
I put one to make my simulator works, but if there is another let me know.

Code: [Select]
typedef struct stLPC23XX_PERIPH
{
    LPC23XX_FAST_GPIO   ucFastGPIO[5];
    LPC23XX_WATCHDOG    ucWDOG;
    LPC23XX_TIMER       ucSimTimer0;
    LPC23XX_TIMER       ucSimTimer1;
    LPC23XX_UART        ucSimUart0;
    LPC23XX_UART        ucSimUart1;
    LPC23XX_IIC         ucIIC0;
    LPC23XX_RTC         ucRTC;
    LPC23XX_LEG_GPIO    ucLegacyGPIO;
    LPC23XX_PIN_CON     ucPIN_CON;
    LPC23XX_SSP         ucSSP1;
    LPC23XX_ADC         ucADC; //ADD//191109//
    LPC23XX_IIC         ucIIC1;
    LPC23XX_SSP         ucSSP0;
    LPC23XX_TIMER       ucSimTimer2;
    LPC23XX_TIMER       ucSimTimer3;
    LPC23XX_UART        ucSimUart2;
    LPC23XX_UART        ucSimUart3;
    LPC23XX_IIC         ucIIC2;
    LPC23XX_RTC_RAM     ulRTC_ram;
    LPC23XX_SCM         ucSCM;
    LPC23XX_EMAC        ucEMAC;
    LPC23XX_EMC         ucEMC;
    LPC23XX_LCD         ucLCD;
    LPC23XX_VIC         ucVIC;
    LPC23XX_VIC_ADD     ucVICAddress;
} LPC23XX_PERIPH;

typedef struct stLPC23XX_ADC
{
unsigned long AD_CR;
unsigned long AD_GDR;
unsigned long AD_INTEN;
unsigned long AD_DR0;
unsigned long AD_DR1;
unsigned long AD_DR2;
unsigned long AD_DR3;
unsigned long AD_DR4;
unsigned long AD_DR5;
unsigned long AD_DR6;
unsigned long AD_DR7;
unsigned long AD_STAT;
} LPC23XX_ADC;

86
µTasker general / Re: Periodic Interrupt Simulation
« on: November 09, 2009, 05:53:06 PM »
Thanks Mark,

Do continue my test I made the following changes :

Code: [Select]
unsigned char fnSimIIC_devices(QUEUE_HANDLE Channel,unsigned char ucType, unsigned char ucData) { //add Channel parameter
....
        fnResetOthers(Channel,(unsigned char)(ucData & ~0x01));//CHG//HP//091109//
....
        fnResetOthers(Channel,0);
....
}

and

Code: [Select]
static void fnResetOthers(QUEUE_HANDLE Channel,unsigned char ucAddress) { //add Channel parameter
....
    if ((ucAddress != simDS1340.address)&&(Channel == simDS1340.channel)) {
        simDS1340.ucState = 0;
    }
    if ((ucAddress != simPCF8574[0].address)&&(Channel == simPCF8574[0].channel)) {
        simPCF8574[0].ucState = 0;
    }
    if ((ucAddress != simPCF8574[1].address)&&(Channel == simPCF8574[1].channel)) {
        simPCF8574[1].ucState = 0;
    }
    if ((ucAddress != simPCF8574[2].address)&&(Channel == simPCF8574[2].channel)) {
        simPCF8574[2].ucState = 0;
    }
...
}
Of course I also added the same variable name on the differents structures :

Code: [Select]
typedef struct stDS1340
{     
unsigned char  channel; //<< added
unsigned char  address;
unsigned char  ucState;
unsigned char  ucRW;
unsigned char  ucInternalPointer;

    TIME_BLOCK     bTime;
} DS1340;

static DS1340 simDS1340 = {0,0xd0, 0};//<< channel 0:


#define ADDRESS_PCF8574_1  0x40
#define ADDRESS_PCF8574_2  0x42
#define ADDRESS_PCF8574_3  0x44

typedef struct stPCF8574
{     
unsigned char  channel;   // << added
unsigned char  address;
unsigned char  ucState;
unsigned char  ucRW;
unsigned char  ucOutput;
} PCF8574;

static PCF8574 simPCF8574[3] = {  //<< channel 1 for all
{1,ADDRESS_PCF8574_1, 0},
{1,ADDRESS_PCF8574_2, 0},
{1,ADDRESS_PCF8574_3, 0} };


Thanks for your comments.



87
µTasker general / Re: Periodic Interrupt Simulation
« on: November 09, 2009, 03:17:22 PM »
Hello Mark,

Thanks a lot for your help, it's so easy when you explained it.
Every thing is mostly working....for this part atleast

In fact I'm using some PIA_I2C on channel 1 and RTC_I2C on channel 2
There's a problem with the simulator which doesn't allow simultaneous communication (even if on different channel) :
In fact the following function resets the internal state of the component no matter the channel it used....
Code: [Select]
       fnResetOthers((unsigned char)(ucData & ~0x01)); I think another parameter is required on both function and structure, to reset only the other components of the same channel ? Isn't it?


(I use external RTC because of higher power consumption of the lpc23xx)



88
µTasker general / Periodic Interrupt Simulation
« on: November 06, 2009, 12:22:14 PM »
Hello,
I want to use the simulator for an RTC component, delivering periodic signal on interrupt pin.
How can I do that with simulator ?
Thanks

89
µTasker general / MultiStart
« on: November 03, 2009, 10:35:36 AM »
Hello,
Where can I find some documentation and source code, on how to use multistart specialy new_hw_init function ?

90
NXPTM LPC2XXX and LPC17XX / PIA I2C Control
« on: November 02, 2009, 02:52:33 PM »
Hello,

I wanted to use PCF8574P, so I had the code to write the correct structure :

Code: [Select]
#define IO_EXPENDER_1_ADDR   0x40
static byte ucTrameIOEX1[] = {IO_EXPENDER_1_ADDR, 0xFF };   
fnWrite(IICPortID, (unsigned char *)ucTrameIOEX1, sizeof(ucTrameIOEX1))


The first write is correct but it look like the write buffer did not get empty : ptQUEQue->chars is incremented but never decremented.

I made following changes :
Code: [Select]
    case MASTER_REPEATED_START_SENT:                                     // (0x10) repeated start has been sent
    case MASTER_START_SENT:                                              // (0x08) start bit sent, now send address
        {
            unsigned long ulAddress = *ptIICQue->IIC_queue.get++;        // the address
//ADD//HP//021109//
if (ptIICQue->IIC_queue.chars)
ptIICQue->IIC_queue.chars--;
//

Code: [Select]
    case MASTER_TX_ADDRESS_NOT_ACKED:                                    // (0x20) the slave address has been sent but no ack was received
    case MASTER_TX_DATA_NOT_ACKED:                                       // (0x30) a byte of data has been sent but was not acked
    case MASTER_TX_DATA_ACKED:                                           // (0x28) a byte of data has been sent and acked
    case MASTER_TX_ADDRESS_ACKED:                                        // (0x18) the slave address was sent and we have received an ack - continue with the TX data
        if (ptIICQue->ucPresentLen != 0) {
            iic->I2CDAT = *ptIICQue->IIC_queue.get++;                    // send first data byte
//ADD//HP//021109//
if (ptIICQue->IIC_queue.chars)
ptIICQue->IIC_queue.chars--;
//


then it works....

Pages: 1 ... 4 5 [6] 7