AnsweredAssumed Answered

Firmware error in ADV212

Question asked by steven on Aug 22, 2012
Latest reply on Aug 22, 2012 by DaveD

HI

 

I am in the process setting the registers for the ADV212 using the Programming Guide.  I have set the firmware in the devices using the encode firmware but when i read back the SWFLAG register i get a value of 0x0003.  The bus uses a 16 bit interface, below is the code i use to load the firmware.

 

//Load firmware on codec board
        PMADDR = 0x400a;    // address for STAGE register
        PMDIN = 0x0005;        // data for stage register, upper bits start of firmware location
        PMADDR = 0x400b;    // address of IADDR register
        PMDIN = 0x0000;        // data for firmware location, lower 16bits
        Nop();

        ptr = firmwareArray;    // set the pointer to the first address of the array
        for (i=0;i<8192;i++){    
            PMADDR = 0x400a;    // address for STAGE register
            PMDIN = *ptr++;        // send value from pointer location and increment
            PMADDR = 0x400c;    // address of IDATA register
            PMDIN = *ptr++;        // send value from pointer location and increment 
        }
        Nop();

 

The firmware array length is 16,384 and is formatted as  unsigned short words due to 16 bit bus.  The array runs through the array and places the first short word in the STAGE register, then the next short word in the IDATA register. 

const unsigned short firmwareArray[] = {
    0xe59f, 0xf018, 0xe59f, 0xf018, 0xe59f, 0xf018, 0xe59f, 0xf018, 0xe59f, 0xf018, 0xe1a0, 0x0000, 0xe59f, 0xf018, 0xe59f, 0xf018, 
    0x0005, 0x0b00, 0x0005, 0x72d4, 0x0005, 0x72d8, 0x0005, 0x72dc, 0x0005, 0x72e0, 0x0000, 0x0000, 0x0005, 0x72f8, 0x0005, 0x7320, 
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,

 

Any help or pointers will be greatly appreciated.

 

Steve

Outcomes