This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

8520 I2c Programming issue.

Other Parts Discussed in Thread: CC8520

Hi,

I am trying to program 8520 using i2c. I am able to program the eeprom and read out the correct data from memory. But when I power in the 8520 module the module is trying to read the data from the memory but doesnt load the application. 

I wish to know some clarifcation on i2c format described in manual. In DWC field : what will be the flash image look like. Are we expected to consider the DWC (2 bytes) + CMD (2 bytes) + data (32K bytes from purepath) + CRC (4 bytes) as final value in DWC. Also what is the byte format for DWC and CMD (MSB first or LSB first). Also I am confused with Data + CRC field. Are we required to add 4 byte CRC at the end of the 32K data because the data already includes CRC.

I am expected an example how the i2c memory format (first 4 bytes and 4 last bytes) will look like in practice for purepath Application Master mode(32K Application).

RBG

  • Hi RBG,

    A few things to mention which might be helpful:

    • The 16-bit fields are big-endian.
    • The size of the "DATA+CRC" field shall be DWC * 4 bytes, not DWC bytes. The Configurator will at the moment generate images of 31 kB.
    • The CRC is already included by the Configurator (at address FBFC for 31 kB images).

    ·   Cheers,

    Per h

  • Hi Per H,

    Thanks for the reply. I worked on changes you suggested with DWC field (hex equivilent of 31K / 4 ) and loaded the image in eeprom. I check for some speciic eeprom address and they match the data from purepath image.  Once the module is placed for programming. I observed the events on the i2c bus and they seem to respond on powering the board. But bootloader freezes and I cant perform any other general SPI instruction either.  Only way out  is to perform complete memory erase.

    1. Is there a way to perform 8520 internal memory read using SPI or I2C.

    2. Can you suggest me the complete steps for programming the device so that I can make sure I am not missing out any key step.

    3. Is the CRC at location &H801C(Purepath image) different than at the end of the image.

    RBG 

     

  • Hey RBG,

    hmmm...It is not possible to read out the internal flash of the CC85xx.

    Can you post the hex file from the configurator and the corresponding binary file which you have loaded into the CC85xx? and we will have a look at it.

     

    cheers,

    Per

  • 3051.I2C Prog Files.zip

    Hi Per,

    I am attaching you the Hex file for Application master for 3254 Codec and file that is used to program the eeprom.

    I will look forward for your inputs.

    RBG

     

  • Hi RBG,

    The following should be added to the start of the EEPROM binary (before "&H25 &H05 &HF0 &H0D ..."):

                     "&H1F &H00 &H00 &H01 "

     (length 31 * 1024 / 4, exit command 1 = start application)

     The last 1 kB of "&HFF" can be removed from the binary (as they will be ignored).

    Hope it will work! Otherwise, let me know :-)

    -P

  • Hi Per,
    I tried out the way you suggested after your first post. I am neglecting the last 1K of message. And I am writing 31K + 4 bytes to the memory. Maping given below.
    I also made sure that my module memory is completely erased before I turn on the device for programming.  

    Address in hex  Data in hex
    0000                   1F  
    0001                   00 
    0002                   00
    0003                   01 
    0004                   25 
    0005                   05 
    0006                   F0
    ....
    ....
    7BFE                  FF
    7BFF                  FF
    7C00                 02
    7C01                 F6
    7C02                 59
    7C03                 02

    -RBG

     

  • RBG,

    Two things to verify:

    1. the address of the EEPROM is 0xA0 – 0xAE (shifted up 1bit, LSB is R/W)?
    2. the max speed of the EEPROM is 400kbps?
    3. Check so there is no glitches on the reset signal and/or power during programming.

     

    For debugging:

    Can you read out the SPI status word as shown at the end of section B-2.4 in the user guide? What status word do you get?

     

    Is it possible for you to log the I2C traffic on the bus? ( attach a scope pic our similar) So we can see what is going on the I2C bus.

     

    -P

  • Hi Per,

    I am attaching (Scope Readout. bmp) the wave form for first 7 bytes of the data transfered on i2c bus (Data indicates : A0 00 00 1F 00 00 01  ..... )

    Attachment (Eprom Read out)  shows data read out at start and end location of memory to verify if the memory is programmed appropiately.

    I check the SPI status word and it returns &h8021. I can not perform any other SPI operation except to erase the memory completely.

    Let me know if you need any other check points to verify. I will be happy to reply.

     

    RBG

     

  • Hey RBG,

    The start of the first I2C transaction looks as I would expect. Does the I2C sequence stop after these 7 bytes, or does it continue by reading 8 more bytes and then the flash image?

    If there are subsequent read accesses (31 x 1 kB blocks in total), we can assume that the I2C programming actually works. Do you observe these read accesses?

    Does I2C programming occur every time you reset the CC8520, or does it require a BL_FLASH_MASS_ERASE command between each I2C programming?

    When entering the bootloader, do you perform the SPI bootloader unlocking sequence? The status word returned by GET_STATUS should be 0x8020. Otherwise the bootloader will freeze, and none of the commands will have any effect.

    If the I2C programming actually works; in what way is the downloaded application non-functional? After a SYS_RESET + a 100 ms delay, what do DI_GET_CHIP_INFO and GET_STATUS return?

  • HI Per,

    Yes, there are more bytes getting transfered after the 7 bytes.  I can observe module performing I2C programming only after BL_FLASH_MASS_ERASE. It doesnt program on System Reset or Hardware Reset

    Also I tried to read the DI_GET_CHIP_INFO and GET_STATUS status of the 8520 module and  it returns repeated value of 0x8021 all the time until the next erase.

    Also the main problem still persist that inspite of i2c programing which I assume is happening,  the device is not able to run the application. What could be possible issue for not running the application.

    RBG

  • Hi,

    I am planing to use i2c for programing. But I havnt got it to work based on above discussion. Can any one recommend me an alternative way to get 8520 to program using i2c.

    RBG