- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
i use a CY8C4024LQI-S412 and i want to use the internal 1,2v reference on Pin 4.0.
The idea is to set the register bit 24 (SW_SGRE) in the register CSD_SW_REFGEN_SEL.
My problem is, how can i set or clear this bit?
i tried:
CSD_SW_REFGEN_SEL |= (1 << SW_SGRE);
but it doesnt work.
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
now i used
refgen = CY_GET_REG32(0x400B02A8);
refgen |= 0x1000000; // Mask Bit 24
CY_SET_REG32(0x400B02A8, refgen); // Set register CSD_SW_REFGEN_SEL (Bit 24)
and it works!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try a
CSD_SW_REFGEN_SEL |= ((uint32)1 << SW_SGRE);
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
sorry, i doesnt work.
I get the message "use of undeclared identifier CSD_SW_REFGEN_SEL"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The original question was "How to set or clear a register bit in software?"
Can you please post your complete project so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
now i used
refgen = CY_GET_REG32(0x400B02A8);
refgen |= 0x1000000; // Mask Bit 24
CY_SET_REG32(0x400B02A8, refgen); // Set register CSD_SW_REFGEN_SEL (Bit 24)
and it works!