cancel
Showing results for 
Search instead for 
Did you mean: 

USB EZ-PD Type-C

zapa_4736586
New Contributor

i want to find  where  in the code   i could see slave address   

the slave  address  set i n  top design    i m review the code but didn't find   file header or source    where  defines  i2c slave address 

Q1 :  where in the source i could see  slave address ?

Q2:  it is possible  to change top design parameters  ( i2c slave address  )  from  command line  

when run .\cyprjmgr.exe -wrk "xxx.cywrk" -build  

Q3:   

0 Likes
1 Solution
PranavaYN
Moderator
Moderator

Hi,

Q1: slave address for I2C is stored in <instance_name>_I2C.h file in generated resources under <instance_name>_I2C_SLAVE_ADDRESS macro.

Q2: It is possible to change design parameters from command line.

You can use 
cyprjmgr.exe –w workspace –build –m params_file 

command where params_file is a text file in following format,

"The params file accepts parameters and their values as name=value pairs. The name of the instance must be
given as inst_name=value"

for example if I2C instance name is I2C_1 then,

inst_name=I2C_1
I2cSlaveAddress= 0x66

This will change slave address to 0x66 from command line. 

Please refer to page no. 373 of PSoC Creator User Guide (https://www.cypress.com/file/137441/download) for more information.

Best regards,
Pranava

View solution in original post

1 Reply
PranavaYN
Moderator
Moderator

Hi,

Q1: slave address for I2C is stored in <instance_name>_I2C.h file in generated resources under <instance_name>_I2C_SLAVE_ADDRESS macro.

Q2: It is possible to change design parameters from command line.

You can use 
cyprjmgr.exe –w workspace –build –m params_file 

command where params_file is a text file in following format,

"The params file accepts parameters and their values as name=value pairs. The name of the instance must be
given as inst_name=value"

for example if I2C instance name is I2C_1 then,

inst_name=I2C_1
I2cSlaveAddress= 0x66

This will change slave address to 0x66 from command line. 

Please refer to page no. 373 of PSoC Creator User Guide (https://www.cypress.com/file/137441/download) for more information.

Best regards,
Pranava

View solution in original post