Can I change the opcode configuration registers of a datapath during runtime?

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

cross mob
ChRe_4711096
Level 4
Level 4
50 replies posted 25 replies posted 25 sign-ins

I'd like my application to load a configuration from flash during startup, and then pick the corresponding opcodes for a datapath and store them in the datapath's configuration registers (DPATH_OPC0..3). Can I do that? Are there any best practices or caveats involved?

0 Likes
1 Solution
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi ChRe_4711096

Have you tried using the APIs CY_GET_REGXX() and CY_SET_REGXX() in your project?

The CY_GET_REG32(addr) reads the 32-bit value from the specified register address while CY_SET_REG32(addr, value) writes a 32-bit value to the specified address but this function can't be used to access the core registers. These two APIs can be used to read and write the values to the specified registers with the help of their addresses.

You can find the address of the datapath configuration register UDB_UDBPAIR0_UDBSNG0_DPATH_OPC0 in the Registers Technical Reference Manual(TRM) of the PSoC device that supports UDB block. For your reference, I have provided the link of the Register TRM for PSoC 63 devices here: https://www.cypress.com/documentation/technical-reference-manuals/psoc-6-mcu-cy8c63x6-cy8c63x7-cy8c6...

Please follow the above and let us know in case of further queries.

Best Regards,

Aashita

View solution in original post

0 Likes
1 Reply
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi ChRe_4711096

Have you tried using the APIs CY_GET_REGXX() and CY_SET_REGXX() in your project?

The CY_GET_REG32(addr) reads the 32-bit value from the specified register address while CY_SET_REG32(addr, value) writes a 32-bit value to the specified address but this function can't be used to access the core registers. These two APIs can be used to read and write the values to the specified registers with the help of their addresses.

You can find the address of the datapath configuration register UDB_UDBPAIR0_UDBSNG0_DPATH_OPC0 in the Registers Technical Reference Manual(TRM) of the PSoC device that supports UDB block. For your reference, I have provided the link of the Register TRM for PSoC 63 devices here: https://www.cypress.com/documentation/technical-reference-manuals/psoc-6-mcu-cy8c63x6-cy8c63x7-cy8c6...

Please follow the above and let us know in case of further queries.

Best Regards,

Aashita

0 Likes