cancel
Showing results for 
Search instead for 
Did you mean: 

Mbed SDK

anRE_4028611
New Contributor

'hope this is the correct forum topic.

Hi, I've been searching through google, the documentation and .h files on Mbed for the targets in subject line but can't find a list of which pins I can use for AnalogIn inputs.  My pinmap.h is empty and that is the file suggested by the mbed documentation.  The pins I've tried so far throw an error as not available for analog input when I compile using MBED Studio as the IDE.  I know I could take off the resistors connected to the thermistor and use P10_1 and P10_2 but there must be an easier selection?

0 Likes
1 Solution
Vasanth
Moderator
Moderator

Hi,

I guess its an issue from our side. Let me check and get back to you on that. Meanwhile for your reference, kindly check the PSoC6 Hardware Design Considerations . Table 4 I/O pin selection guide suggests what are the pins suitable for each analog peripheral available. You can use this as a guideline for selecting the right pin to ensuring the functionality

Best Regards,
Vasanth

View solution in original post

4 Replies
Vasanth
Moderator
Moderator

Hi,

Kindly use the pins specified in the BSP. For each target BSP, you have cybsp_types.h file at this location. mbed-os\targets\TARGET_Cypress\TARGET_PSOC6\TARGET_CY8CPROTO_062_4343W. You have to make use of these pins.

Best Regards,
Vasanth

For each target BSP, you have cybsp_types.h file at this location

anRE_4028611
New Contributor

HI Thanks for your reply,

But, why are P10_1 and P10_2 (and indeed any of them P10_x) not included in this file when they are actually available for analogue inputs eg from the thermistor, which I use in my project and seems to work fine.  The file doesn't seem to define all the pins on the proto board connectors, does this mean that any not defined "should" not be usable in mbed?

Cheers A

0 Likes
Vasanth
Moderator
Moderator

Hi,

I guess its an issue from our side. Let me check and get back to you on that. Meanwhile for your reference, kindly check the PSoC6 Hardware Design Considerations . Table 4 I/O pin selection guide suggests what are the pins suitable for each analog peripheral available. You can use this as a guideline for selecting the right pin to ensuring the functionality

Best Regards,
Vasanth

View solution in original post

anRE_4028611
New Contributor

Hi Vasanth,

Thanks for that.

I did a bit of experimenting and as far as I can tell it is only the port P10_x pins that are available for AnalogIn().  So with the proto board I was able to access these and add in some more sensors by removing and partially reattaching the Thermistor and pdm wing:20200718_154003.jpg

And thanks to Alan Hawse for his mouser aws example I can now update the thing shadow:

aws shadow.png

Cheers and thanks for pointing me at the hardware spec, very useful!

Andrew

0 Likes
Top labels