cancel
Showing results for 
Search instead for 
Did you mean: 

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

guo qiang
Senior
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 discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee
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

View solution in original post

5 REPLIES 5
Erwan YVIN
ST Employee
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
Posted on June 27, 2017 at 02:45

0690X00000607WIQAY.png

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

0690X00000607H4QAI.png

SPC5 Studio, version: 5.4

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

Posted on June 27, 2017 at 09:20

ok ,I see. 

but

0690X00000607W3QAI.png0690X00000607JyQAI.png

this macro configTOTAL_HEAP_SIZE  This array includes all the necessary queues, task stack memory,

I have a lot of tasks, must be a lot of memory, so I have to configTOTAL_HEAP_SIZE macro set is large, as long as no more than 64K on it. (SPC560B54L5, 64K SRAM)

Posted on June 28, 2017 at 16:06

Hello Guo ,

you can not configure greater than 8192

I recommend to you to customize configTOTAL_HEAP_SIZE

by creating a new constant.

i am creating a CR to increase the limit

       Best regards

                       Erwan