LPC55S3x (64-pin) – Sharing PWM Pins with SWD (PIO0_0 & PIO0_9) – Possible?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC55S3x (64-pin) – Sharing PWM Pins with SWD (PIO0_0 & PIO0_9) – Possible?

1,026 Views
sharat
Contributor I

Hello NXP Team,

I am using the LPC55S3x (64-pin package) and have a question regarding pin multiplexing between PWM outputs and SWD debug functions.

In my hardware design, most GPIOs are already allocated, and I am using several pins for PWM outputs. However, I also require SWD debugging access (SWDIO / SWCLK) for firmware programming and debugging.

In the 64-pin package, the following pins are mapped as:

  • PIO0_0 → PWM1_B2

  • PIO0_9 → PWM1_A2

At the same time, these same pins are also required for:

  • PIO0_0 → SWCLK

  • PIO0_9 → SWDIO

Due to pin limitations in the 64-pin package, I do not have any alternative pins available for SWD.

My questions are:

  1. Is it safe and recommended to share PIO0_0 and PIO0_9 between PWM and SWD?

  2. Can these pins be used as SWD only during programming/debug, and then reconfigured as PWM during runtime?

0 Kudos
Reply
3 Replies

969 Views
RomanVR
NXP Employee
NXP Employee

Hello @sharat, hope you are doing well.

I would not recommend to share the functionality of these pins as the SWDIO and SWCLK need external pull-up resistors to comply with ARM SWD spec as stated in the LPC55S3X Data Sheet.

Regarding your second question, it is possible to do this reconfiguration, however if you were debugging your application and would after use these pins as PWM, you would lose your debug session while and after reconfiguring the pins to function as PWM.

Hope this answers your questions.

Best Regards!
0 Kudos
Reply

958 Views
sharat
Contributor I

Hi @RomanVR 

Lets assume  i have connected these pins to Switches in hardware .

1]While debugging or Dumping the code wont they affect those Switches?

0 Kudos
Reply

947 Views
RomanVR
NXP Employee
NXP Employee

Hi @sharat.

Further hardware decisions for your design will need to be evaluated on your side to ensure they meet your specific requirements.

Best Regards!
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2318929%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELPC55S3x%20(64-pin)%20%E2%80%93%20Sharing%20PWM%20Pins%20with%20SWD%20(PIO0_0%20%26amp%3B%20PIO0_9)%20%E2%80%93%20Possible%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2318929%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20NXP%20Team%2C%3C%2FP%3E%3CP%3EI%20am%20using%20the%20LPC55S3x%20(64-pin%20package)%20and%20have%20a%20question%20regarding%20pin%20multiplexing%20between%20PWM%20outputs%20and%20SWD%20debug%20functions.%3C%2FP%3E%3CP%3EIn%20my%20hardware%20design%2C%20most%20GPIOs%20are%20already%20allocated%2C%20and%20I%20am%20using%20several%20pins%20for%20PWM%20outputs.%20However%2C%20I%20also%20require%20SWD%20debugging%20access%20(SWDIO%20%2F%20SWCLK)%20for%20firmware%20programming%20and%20debugging.%3C%2FP%3E%3CP%3EIn%20the%2064-pin%20package%2C%20the%20following%20pins%20are%20mapped%20as%3A%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EPIO0_0%20%E2%86%92%20PWM1_B2%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EPIO0_9%20%E2%86%92%20PWM1_A2%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EAt%20the%20same%20time%2C%20these%20same%20pins%20are%20also%20required%20for%3A%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EPIO0_0%20%E2%86%92%20SWCLK%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EPIO0_9%20%E2%86%92%20SWDIO%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EDue%20to%20pin%20limitations%20in%20the%2064-pin%20package%2C%20I%20do%20not%20have%20any%20alternative%20pins%20available%20for%20SWD.%3C%2FP%3E%3CP%3EMy%20questions%20are%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CP%3EIs%20it%20safe%20and%20recommended%20to%20share%20PIO0_0%20and%20PIO0_9%20between%20PWM%20and%20SWD%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ECan%20these%20pins%20be%20used%20as%20SWD%20only%20during%20programming%2Fdebug%2C%20and%20then%20reconfigured%20as%20PWM%20during%20runtime%3F%3C%2FP%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2320792%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LPC55S3x%20(64-pin)%20%E2%80%93%20Sharing%20PWM%20Pins%20with%20SWD%20(PIO0_0%20%26amp%3B%20PIO0_9)%20%E2%80%93%20Possible%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2320792%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259982%22%20target%3D%22_blank%22%3E%40sharat%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EFurther%20hardware%20decisions%20for%20your%20design%20will%20need%20to%20be%20evaluated%20on%20your%20side%20to%20ensure%20they%20meet%20your%20specific%20requirements.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2320532%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LPC55S3x%20(64-pin)%20%E2%80%93%20Sharing%20PWM%20Pins%20with%20SWD%20(PIO0_0%20%26amp%3B%20PIO0_9)%20%E2%80%93%20Possible%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2320532%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F243613%22%20target%3D%22_blank%22%3E%40RomanVR%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELets%20assume%26nbsp%3B%20i%20have%20connected%20these%20pins%20to%20Switches%20in%20hardware%20.%3C%2FP%3E%3CP%3E1%5DWhile%20debugging%20or%20Dumping%20the%20code%20wont%20they%20affect%20those%20Switches%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2320430%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LPC55S3x%20(64-pin)%20%E2%80%93%20Sharing%20PWM%20Pins%20with%20SWD%20(PIO0_0%20%26amp%3B%20PIO0_9)%20%E2%80%93%20Possible%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2320430%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259982%22%20target%3D%22_blank%22%3E%40sharat%3C%2FA%3E%2C%26nbsp%3Bhope%20you%20are%20doing%20well.%3C%2FP%3E%0A%3CP%3EI%20would%20not%20recommend%20to%20share%20the%20functionality%20of%20these%20pins%20as%20the%20SWDIO%20and%20SWCLK%20need%20external%20pull-up%20resistors%20to%20comply%20with%20ARM%20SWD%20spec%20as%20stated%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fdata-sheet%2FLPC55S3xDS.pdf%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ELPC55S3X%20Data%20Sheet%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3ERegarding%20your%20second%20question%2C%20it%20is%20possible%20to%20do%20this%20reconfiguration%2C%20however%20if%20you%20were%20debugging%20your%20application%20and%20would%20after%20use%20these%20pins%20as%20PWM%2C%20you%20would%20lose%20your%20debug%20session%20while%20and%20after%20reconfiguring%20the%20pins%20to%20function%20as%20PWM.%3C%2FP%3E%0A%3CP%3EHope%20this%20answers%20your%20questions.%3C%2FP%3E%3C%2FLINGO-BODY%3E