Skip to main content
guo qiang
Senior
June 26, 2017
Solved

i have two SPC5 I2C Driver problem and The SPC5studio IDE problem

  • June 26, 2017
  • 1 reply
  • 1367 views
Posted on June 26, 2017 at 11:46

question 1:

i2c_result_t i2c_lld_write(uint8_t dev_addr, uint16_t reg_addr,uint8_t *data, uint8_t ndata_bytes)

{

..................

  /* Check for valid address */

   if ((dev_addr < 8U) || (dev_addr > 119U))

   {

      return I2C_ERROR_INVALID_ADDRESS;

    }

................

}

Why is the slave address between 8-119? Is this slave address 7bit or 8bit?

question 2:

My project uses FreeRTOS, each time the code generated, the macro configUSE_TIMERS will automatically become 0. And the Makefile in the compiler parameters will automatically become -O2. Each modification is very troublesome, how can I do?

    This topic has been closed for replies.
    Best answer by Erwan YVIN
    Posted on June 26, 2017 at 16:31

    Hello ,

    Question 1:

    Why is the slave address between 8-119?Is this slave address 7bit or 8bit?

    A seven bit wide address space theoretically allows 128 I2C addresses – however, some addresses are reserved for special purposes. Thus, only 112 addresses are available with the 7 bit address scheme

    Question 2:

    the Makefile is generated

    1) -O2 is set in the platform component

    2) for the timer , Go to SPC5 FreeRTOS Component RLA and check Use Software timers

    ==> Save and generate

    Best regards

    Erwan

    ________________

    Attachments :

    2017-06-26 16_29_21-workspace - SPC5Studio - SPC560Dxx_RLA FreeRTOS SERIAL Test Application for Disc.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyaO&d=%2Fa%2F0X0000000b9p%2FcQTNlN6H2MIIhv4R2XkT0FZrTS8nW6Vzy2iacPUnNDQ&asPdf=false

    1 reply

    Erwan YVIN
    Erwan YVINBest answer
    ST Employee
    June 26, 2017
    Posted on June 26, 2017 at 16:31

    Hello ,

    Question 1:

    Why is the slave address between 8-119?Is this slave address 7bit or 8bit?

    A seven bit wide address space theoretically allows 128 I2C addresses – however, some addresses are reserved for special purposes. Thus, only 112 addresses are available with the 7 bit address scheme

    Question 2:

    the Makefile is generated

    1) -O2 is set in the platform component

    2) for the timer , Go to SPC5 FreeRTOS Component RLA and check Use Software timers

    ==> Save and generate

    Best regards

    Erwan

    ________________

    Attachments :

    2017-06-26 16_29_21-workspace - SPC5Studio - SPC560Dxx_RLA FreeRTOS SERIAL Test Application for Disc.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyaO&d=%2Fa%2F0X0000000b9p%2FcQTNlN6H2MIIhv4R2XkT0FZrTS8nW6Vzy2iacPUnNDQ&asPdf=false
    guo qiang
    guo qiangAuthor
    Senior
    June 27, 2017
    Posted on June 27, 2017 at 02:45

    0690X00000607WIQAY.png

    ....Why i did not........

    0690X00000607H4QAI.png

    SPC5 Studio, version: 5.4

    Erwan YVIN
    ST Employee
    June 27, 2017
    Posted on June 27, 2017 at 09:05

    Hello Guo ,

    You have not clicked on the good configuration settings.

    0690X00000607WSQAY.png

    Click on the outline view to change your panel (cf SPC5Studio Help)

           Best regards

                  Erwan