Dear all,
I'm developing a project with LPC5526JBD100 CPU that has to handle ten analog input,
I used all analog inputs assigned to the pins 10,11,12,13,14,20,21,22,23,24
Infortunately pins 12 and 13 conflict width SWD debug pins (SWDIO pin 12 and SWCLK pin 13)
Did you have any similar problem ? How did you fix it?
Thank you very much for your help and cooperation
best regards
Solved! Go to Solution.
> Is there any weakness to use an hardware switch to phisically redirect the pins 12 an 13 to the debugger or to the analog input ?
Yes.
You will be unable to debug once the pins are re-initialized by your code.
Forgoing the debug capability created considerable headaches for many developers trying this approach, just check out this and similar fora.
Since your question suggests you are not very experienced, I would recommend against it.
Unless you need analogue data rates in the MSps range, an external ADC with serial interface reduces not only the MCU pin count, but also eases the hardware/PCB design, especially in regard to the analog power supply and EMI.
Hello @_Ferrari_,
Yes, as you said the LPC5526 needs PIO0_11 and PIO0_12 for SWD operation.
You could try to use an extra ADC module (external), for the last two pins that you want to use, and then connect the output to other GPIO pins.
Hope this helps you.
Regards, Raul.
Dear RaulRomero,
thank you for your answer,
you wrote:
>You could try to use an extra ADC module (external), for the last two pins that you want to use, and then connect the output to other GPIO pins
ok, this is the easier solution.
Is there any weakness to use an hardware switch to phisically redirect the pins 12 an 13 to the debugger or to the analog input ?
thank you very much for your help and cooperation.
best regards.
> Is there any weakness to use an hardware switch to phisically redirect the pins 12 an 13 to the debugger or to the analog input ?
Yes.
You will be unable to debug once the pins are re-initialized by your code.
Forgoing the debug capability created considerable headaches for many developers trying this approach, just check out this and similar fora.
Since your question suggests you are not very experienced, I would recommend against it.
Unless you need analogue data rates in the MSps range, an external ADC with serial interface reduces not only the MCU pin count, but also eases the hardware/PCB design, especially in regard to the analog power supply and EMI.
thanks
Ok