6 years, 10 months ago.

How to set up P26, P25 pad as AIN6 and AIN7 in the 4th function group ?

Hi , a new guy here, hoping to get some help. The Wiznet board I am using is Wizwiki-W7500ECO, and I need to use all its 6 channels of ADC, that is AIN0, 1, 2, 3, 4, 6,7. By default, we get the first 4 channels (AIN0,1,2,3) in the "normal function" group without having to do anything. But the last two channels, AIN6, and AIN7, on pad P26, and P25 are defaulted to be PWM1, 0. What do I have to do in the code to set up the two pads to be analog input (in 4th function group) ? I have already tried the regular method of using statement <<code>> AnalogIn AIN6(P26); AIN6, K1_3G/AIN6_SPARE AnalogIn AIN7(P25); AIN7, K2_3G/AIN7_SPARE <<code>> That does not work for these two pads. An example code would be very appreciated. h.s.

Question relating to:

WIZnet is a fabless semiconductor company specializing in Hardware TCP/IP Ethernet controller and SoC, with high performance and low cost solution.

nobody ?

posted by h s 25 Jan 2018

What you did should normally work, which I guess means they have not implemented it. This is the source code: https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_WIZNET/TARGET_W7500x/analogin_api.c, maybe it helps you. Since I don't have the board myself I can't do much more to help sadly.

posted by Erik - 30 Jan 2018

Thanks Erik. According to the code in analogin_api.c, the last two channels of ADC , i.e. ADC_CH6 and 7, which I am trying to use, are not implemented in mebed support so far. That is unfortunate. Wiznet should have made it clear about the unsupported functionalities, so that the users would not plan on using them.

posted by h s 31 Jan 2018

1 Answer

5 years, 10 months ago.

Hello,

Sorry for the late reply. HAL_PAD_AFConfig(PAD_PC,GPIO_Pin_9, PAD_AF3); HAL_PAD_AFConfig(PAD_PC,GPIO_Pin_8, PAD_AF3); If you insert the above code, you can use P25 and P26 as AnalogIn.

Seriously, why does it takes the WIZnet Support Team so long to reply to any question?

posted by Jose Marquez 14 Jan 2019