Announcements

Ever wondered how you could shape the future in collaboration with others? Join us at OktoberTech Asia Pacific and get inspired. Click here to sign up FREE of charge.

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

PSoC™ 6 Forum Discussions

GrCa_1363456
Level 5
First comment on KBA First comment on blog 250 sign-ins
Level 5

Please provide an example to calibrate the trim and slope values for the comparator in a PSoC 6
I was not able to find any examples or better documentation for how to do this.

Additionally please provide more detail on the functions:

- Cy_CTB_OpampGetOffset
- Cy_CTB_OpampGetSlope
- Cy_CTB_OpampSetOffset
- Cy_CTB_OpampSetSlope

And these functions that manipulate the registers:

- CTBM_OA1_OFFSET_TRIM
- CTBM_OA1_SLOPE_OFFSET_TRIM

The register locations appear to be 6-bit numbers with the MSB being a direction bit.
It isn’t clear how the direction bit is being used, i.e. is it a sign bit or something else.
Any examples related to this would be helpful.

Greg

P.S. I found partial description of the registers, “CTBM0_OA0_OFFSET_TRIM”, in the PSoC 6 Registers TRM. Similar descriptions are in the Architecture TRM.
Both TRMs (Technical Reference Manuals) are located under the “PSoC 6 Documentation” section @ https://www.infineon.com/cms/en/product/microcontroller/32-bit-psoc-arm-cortex-microcontroller/psoc-...

0 Likes
1 Solution
Vasanth
Moderator
Moderator 250 sign-ins 500 solutions authored First question asked
Moderator

Hi,

Please see the pdl documentation with pseudo code for reference. Hope this is helpful.

https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__ctb__functions__trim...

 

Best Regards,
Vasanth

View solution in original post

1 Reply
Vasanth
Moderator
Moderator 250 sign-ins 500 solutions authored First question asked
Moderator

Hi,

Please see the pdl documentation with pseudo code for reference. Hope this is helpful.

https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__ctb__functions__trim...

 

Best Regards,
Vasanth