- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Have been working with the 41-40xx kit, i would like to read the voltage on the onboard potentiometer and printing the result via UART on the PC.
I'm following a code example that does this, so i created a new project and added the components on the schematic, assigned the pins, incremented heap size and placing the -u_printf_float flag on the linker, also enabling the nano lib.
Then started to write the C code but when i call the CapSense_ADC_Start() function, the project doesn't run (the red LED doesn't blink), when i comment that CapSense_ADC_Start() function the project works as expected (a blinky red LED).
I had changed the stack size to 0x200 (previously it had 0x400, the example code have 0x200).
Attached is the project if someone like to take a look and maybe spot my error.
Carlos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You did not define any widget (button, slider, proxi) for your capsense component.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, just wanted an ADC channel, i defined one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Will probably not work. Define a button at least.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yep, adding a dummy capsense button did the trick, now at least the program doesn't get stuck.
Is this (adding a button to get the ADC function) documented somewhere on the CapSense_ADC datasheet? I haven't read the whole thing.
Thanks for the help Bob :), will upload the project when i get it running properly.
Carlos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I did not look for a documentation, but I suspected that to be the cause and looked into the initialization code. Programming for 40 years pays for itself in cases like this 😉
Bob