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

Pages: 1 2 [3]
31
µ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 ?

32
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....

33
NXPTM LPC2XXX and LPC17XX / Parameters Save Command
« on: October 22, 2009, 10:50:19 AM »
Hello,

I notice that the
Save command is not working...
When I did it, the memory dump of parameters was :

00030000:55 55 55 55 ff ff ff ff ff ff ff ff ff ff ff ff    UUUU............
00030010:55 55 55 55 ff ff ff ff ff ff ff ff ff ff ff ff    UUUU............
00030020:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030030:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030040:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030050:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030060:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030070:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030080:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030090:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300a0:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300b0:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300c0:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300d0:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300e0:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300f0:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

I change the code to suppress the line
Code: [Select]
      fnDelPar(SWAP_PARAMETER_BLOCK);                                   // delete old block and validate new one.
then the dump gave me:
00030000:55 55 55 55 ff ff ff ff ff ff ff ff ff ff ff ff    UUUU............
00030010:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030020:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030030:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030040:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030050:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030060:18 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030070:00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030080:0c ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00030090:1d ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300a0:12 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300b0:e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300c0:1f ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300d0:23 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    #...............
000300e0:c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
000300f0:a8 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

It looks the valid parameter block is deleted ...
Do you have some idea where it comes from ?

Code: [Select]
extern int fnSaveNewPars(int iTemp)
{
#ifdef USE_PARAMETER_BLOCK
   // Network variables
   if (iTemp == SAVE_NEW_PARAMETERS_CHECK_CRITICAL) {                    // we check to see whether network parameters have been changed
       if (((temp_pars->temp_parameters.ucServers & ACTIVE_DHCP) != (parameters->ucServers & ACTIVE_DHCP)) || (uMemcmp((unsigned char *)&temp_pars->temp_network, (unsigned char *)&network_flash, sizeof(NETWORK_PARAMETERS)))) {
           return 1;                                                     // since a network parameter has been change, we warn the user that he/she will have to validate afterwards
       }
   }
    #ifndef USE_PAR_SWAP_BLOCK
   fnDelPar(INVALIDATE_PARAMETER_BLOCK);                                 // delete parameter block before continuing
   iTemp = SAVE_NEW_PARAMETERS;
    #endif
   fnSetPar((unsigned short)(PAR_NETWORK | TEMPORARY_PARAM_SET), (unsigned char *)&temp_pars->temp_network, sizeof(NETWORK_PARAMETERS)); // network parameters

   // device parameters
   fnSetPar((PAR_DEVICE | TEMPORARY_PARAM_SET), (unsigned char *)&temp_pars->temp_parameters, sizeof(PARS));  // copy the new set to the swap buffer (temp)

   if (iTemp != SAVE_NEW_PARAMETERS_VALIDATE) {
   #ifdef ACTIVE_FILE_SYSTEM
//       fnDelPar(SWAP_PARAMETER_BLOCK);                                   // delete old block and validate new one.
   #endif
//     uMemcpy(&network, &temp_pars->temp_network, sizeof(NETWORK_PARAMETERS)); // update working parameter set - we never do this since we always reset after a network change (otherise we can have DHCP difficulties, since DHCP values will be overwritten)
       uMemcpy(parameters, &temp_pars->temp_parameters, sizeof(PARS));
   }
#endif
   return 0;
}

34
µTasker general / uFileWrite
« on: October 07, 2009, 10:16:34 AM »
Does there is any way to have a fseek function on uFileWrite ?
like SubFile with SUB_FILE_SIZE = 1 ....

Pages: 1 2 [3]