PSoC4S : How to change ATRIM and WDTRIM in PSoC Creator

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Dear Sirs and Madams,

 

We are developing PSoC4S(CY8C4126AXI-S443)) device using PSoC Creator IDE.

Also, I am using an external crystal for my PSoC4S.

 

According to PSoC4S Architecture TRM, I understand that I need to set ATRIM and WDTRIM.

MaMi_1205306_0-1678864146464.png

For example, if We would like to set "ATRIM to 0x03" and "WDTRIM to 0x01", how should We set it in PSoC Creator?

There is a description of ATRIM and WTRIM at page 87 "9.2.4.1 ECO Trimming" in Architecture TRM , but We can't find a register that corresponds to Register TRM.

 

Also, what would happen if ATRIM and WDTRIM were a non-existent combination like "ATRIM:0x03" and "WDTRIM:0x02"?
It seems that the default settings are "ATRIM:0x03" and "WDTRIM:0x02".

 

/* PSoC 4100S Family PSoC 4 Architecture Technical Reference Manual (TRM) */

file:///C:/Users/030528/Desktop/Infineon-PSoC_4100S_and_PSoC_4100S_Plus_PSoC_4_Architecture_TRM-Addi...

 

/* PSoC 4100S Family PSoC® 4 Registers Technical Reference Manual (TRM) */

https://www.infineon.com/dgdl/Infineon-PSoC_4100S_Family_PSoC_4_Registers_Technical_Reference_Manual...

 

Regards,

1 Solution

Hi @MiNe_85951 ,

CY_SET_REG32(addr, value); is used to write a 32 bit vaule to the specified register.

/* Writing 0x03 to ATRIM and 0x01 to WDTRIM in the 
EXCO_ECO_TRIM0 register (address: 0x402FFF00) */

CY_SET_REG32(0x402FFF00, ((0x03<<2) | 0x01) );

Best regards,
Rakesh

View solution in original post

4 Replies
Rakesh_Patrudu
Moderator
Moderator
Moderator
25 solutions authored 5 likes given 50 replies posted

Hi @MiNe_85951 ,

Kindly refer to the PSoC 4100S Plus Family register TRM  to locate ECO Trim Register (EXCO_ECO_TRIM0) for ATRIM and WDTRIM. 

Best Regards,
Rakesh

 

MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Rakesh-san,

 

Thank you for your support.

If we would like to change "ATRIM to 0x03" and "WDTRIM to 0x01" to the EXCO_ECO_TRIM0 register, could you please tell me how to describe it in main.c?

 

MaMi_1205306_0-1679037278875.png

 

/* Set ATRIM=0x03 and WDTRIM=0x01 */

EXCO_ECO_TRIM0 = 0x0000000D

 

Is the above description correct?

 

Regards,

0 Likes

Hi @MiNe_85951 ,

CY_SET_REG32(addr, value); is used to write a 32 bit vaule to the specified register.

/* Writing 0x03 to ATRIM and 0x01 to WDTRIM in the 
EXCO_ECO_TRIM0 register (address: 0x402FFF00) */

CY_SET_REG32(0x402FFF00, ((0x03<<2) | 0x01) );

Best regards,
Rakesh

MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Rakesh-san,

 

I appreciate your prompt response.

It was very helpful information.

 

Regards,

0 Likes