AnsweredAssumed Answered

SJA1105 configuration data question

Question asked by Leon Lin on Jul 4, 2017

Hi,

       I install SJA1105 configuration tool by sja1105_appboard_v12.exe, and run the .bat files to generate the .hex and  .c file.  Now I got 4 configuration data are as followings, and I read the documations(UM10944, AH1601) but I still have some questions about how to write this configuration data into the SJA1105 correctly.

 

1. The config_data_0[], config_data_1[], config_data_2[], config_data_3[] are all data? Or it is including device ID or block ID or CRC?

2. The SPI write's Device ID is always  0x9E00030E ?

3. The SPI write's Block ID is always 0?

4. Because the config_data_x[] generated by .bat each data length is over the SPI max data write length, I need to spilit it into 2 steps. For exmaple config_data_0[] length is 32bit * 65. If I write the config_data_0 with 32bit * 33 + 32bit * 32.

The block length which I need to write are 33 and 32, right? Or the unit is byte, so I need to change block length as 33*4 and 32 * 4? 

5. And CRC values need calculate them by ourselves and it don't count in block length, right?

6. Is there any document or pesudo codes or sample codes in any platform that we can refer more details for how to write configuration data? 

 

static const uint8_t config_data_0[] = { 0x80, 0x20, 0x00, 0x00, 0x9E, 0x00, 0x03, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x21, 0x6F, 0x25, 0x6B, 0xFE, 0xF7, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0B, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0B, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0B, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0B, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0B, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0B, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0B, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0B, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFE, 0xF7, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF };

static const uint8_t config_data_1[] = { 0x80, 0x20, 0x04, 0x00, 0xFE... omit....., 0xBD, 0xC8 };

static const uint8_t config_data_2[] = { 0x80, 0x20, 0x08, 0x00, 0x00... omit......, 0x00, 0x01 };

static const uint8_t config_data_3[] = { 0x80, 0x20, 0x0C, 0x00, 0x3A... omit....., 0x7C, 0xE2 };

Outcomes