cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

New Contributor II

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
Reply
1 Solution
Moderator
Moderator

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
Reply
1 Reply
Moderator
Moderator

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
Reply
Top labels