Any bugs you encounter with Flowcode should be discussed here.
stefan.erni
Valued Contributor
Posts: 1065 http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 201 times
Been thanked: 224 times
Post
by stefan.erni » Wed Jul 23, 2025 9:52 am
Hi to All
If I use the MCP356x1 init macro I get an error.
C:/Users/Desktop/esp-idf-2/mtxesp32s_sdkconfig/main/esp-project.c: In function 'FCD_07892_ADC_MCP356X1__Initialise':
C:/Users/Desktop/esp-idf-2/mtxesp32s_sdkconfig/main/esp-project.c:533:10: error: 'FCR_RETVAL' is used uninitialized [-Werror=uninitialized]
Attachments
Post_MCP1.fcfx
(9.52 KiB) Downloaded 45 times
BenR
Matrix Staff
Posts: 1951 Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 510 times
Been thanked: 696 times
Post
by BenR » Wed Jul 23, 2025 3:08 pm
Hi Stefan,
Thanks for letting us know, hopefully resolved for you now via library updates.
stefan.erni
Valued Contributor
Posts: 1065 Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 201 times
Been thanked: 224 times
Post
by stefan.erni » Mon Aug 04, 2025 11:16 am
Hi Ben
I can compile, but when I send measured values to uart, I get an invalid device handle from SPI instead of measured values.
from my terminal program:
2025-08-04_12-09-27.PNG (32.5 KiB) Viewed 584 times
Attachments
Post_MCP2.fcfx
(12.54 KiB) Downloaded 32 times
stefan.erni
Valued Contributor
Posts: 1065 Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 201 times
Been thanked: 224 times
Post
by stefan.erni » Tue Aug 05, 2025 9:06 am
Hi Ben
It's working now.
First I tested in software mode SPI and it was ok.
Then I reduced the prescale from 40Mhz to 20Mhz like in the pdf from the MCP35x1 and now the value are ok and no messages
reduced:
SNAG-0020.PNG (63.01 KiB) Viewed 564 times
result:
2025-08-05_09-58-09.PNG (89.09 KiB) Viewed 564 times