- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the Device Configurator tool in ModusToolbox to add a CTDAC to my application. It is a simple PSoC63 application where I start with the ADC_basic code example and a CTDAC so I can measure the CTDAC at the single-ended basic ADC.
After saving the configuration, a "cycfg_routing.c" file is generated which causes an error during the build.
bsps/TARGET_APP_CY8CPROTO-063-BLE/config/GeneratedSource/cycfg_routing.c: In function 'init_cycfg_routing':
bsps/TARGET_APP_CY8CPROTO-063-BLE/config/GeneratedSource/cycfg_routing.c:33:5: error: 'CTBM0' undeclared (first use in this function)
33 | CTBM0->CTB_CTRL |= CTBM_CTB_CTRL_ENABLED_Msk;
| ^~~~~
bsps/TARGET_APP_CY8CPROTO-063-BLE/config/GeneratedSource/cycfg_routing.c:33:5: note: each undeclared identifier is reported only once for each function it appears in
bsps/TARGET_APP_CY8CPROTO-063-BLE/config/GeneratedSource/cycfg_routing.c:33:24: error: 'CTBM_CTB_CTRL_ENABLED_Msk' undeclared (first use in this function)
33 | CTBM0->CTB_CTRL |= CTBM_CTB_CTRL_ENABLED_Msk;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
I can get the application to build with zero errors if I comment out the line below.
#include "cycfg_routing.h"
void init_cycfg_routing(void)
{
// CTBM0->CTB_CTRL |= CTBM_CTB_CTRL_ENABLED_Msk;
}
With this line commented out, the CTDAC still drives the desired voltage, and I can measure it using ADC.
What did I miss in the configuration which requires this statement and under what conditions is this needed?
Solved! Go to Solution.
- Tags:
- DeviceConfigurator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I have recreated the issue from my end. You can rectify the issue by adding the header file "cyble_416045_02_device.h" in the file cyconfig_routing.c as shown below.
Thanks and Regards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please share your project so that I can reproduce the issue from my end?
Thanks and Regards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Leo,
Sure. It is attached. It is repeatable if you create a new "ADC_basic" application and just add a DAC using the Device Configurator and build. You will see the error. You do not need to add the DAC calls to main.c as I did in the attached.
I used these values in the configurator to generate the DAC configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I have recreated the issue from my end. You can rectify the issue by adding the header file "cyble_416045_02_device.h" in the file cyconfig_routing.c as shown below.
Thanks and Regards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Leo.