X-NUCLEO-SRC1M1 USB-PD Example can not be ported to custom boards
Hi there,
I am running a board simmilar to the X-NUCLEO-SRC1M1 but with a different pinout at the MCU. More detailed, my ISense and VSense Pins are connected to ADC9 and ADC10 instead of ADC0 and ADC15.
The example works with the nucleo Board just fine.
I changed the VSENSE_ADC_CHANNEL definitions in the src1m1_conf.h to my respective values to port to my board.
The code generated however still measures on ADC0 and thus does start the charging process but will terminate immediately, because it senses 0V at the connector and something must be wrong. I verified it is measuring at ADC0 by applying known voltages to that pin and checking the ADC output variables.
I tried manually starting the ADC with DMA but with little sucess.
I also tried manually going through the code to find out where the definition might be skipped but did not find anything.
Could it be that there is a bug in the code and it fails to set up the pins properly but the example "accidentally" works, because voltage is routed to ADC 0 anyways?
Any ideas? Thanks,
Jakob
