[LPC55S69] Zephyr: uart-mcumgr on shared flexcomm port

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

[LPC55S69] Zephyr: uart-mcumgr on shared flexcomm port

789 Views
ED8500
Contributor II

Hi all,

I have an application running on the NXP that communicates with a host application over uart flexcomm0. Working fine. What I want to implement is DFU (using mcumgr from the same host) but I only have this one single flexcomm0 between the host and NXP. So custom commands and DFU need to go over the same flexcomm.

I found a post that says mcumgr can be on a shared uart by just adding CONFIG_MCUMGR_TRANSPORT_SHELL=y to the prj.conf. But seems like it doesn't work. Tried all kinds of combinations but to no avail.

I'm talking about this:

zephyr,console = &flexcomm0;
zephyr,shell-uart = &flexcomm0;
zephyr,uart-mcumgr = &flexcomm0;

My custom parser works fine until the point I enable the CONFIG_MCUMGR=y, so I must be missing some config flags probably.

So question is: can both be on the same port? If yes, what flags should be set (or not set) in the prj.conf?

Thanks in advance!

0 Kudos
Reply
3 Replies

684 Views
carlos_o
NXP TechSupport
NXP TechSupport

Hi @ED8500 

Apologies the late reply,

The lpcxpresso55s69 has a DFU example, could you please try to add the same configurations to your project?

carlos_o_0-1763140349203.png

the example overlay is to enable dfu permanent download

 

 

 

 

0 Kudos
Reply

609 Views
ED8500
Contributor II

Thanks Carlos for the feedback. The trick was to remove the shell-uart from the app.overlay file and keep the console and uart-mcumgr. In the prj.conf  replace  the CONFIG_MCUMGR_TRANSPORT_UART by CONFIG_MCUMGR_TRANSPORT_SHELL. I'm currently testing it but it seems to work nicely...

0 Kudos
Reply

537 Views
carlos_o
NXP TechSupport
NXP TechSupport

Thanks for sharing, let me know if you have issues 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2200891%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%5BLPC55S69%5D%20Zephyr%3A%20uart-mcumgr%20on%20shared%20flexcomm%20port%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2200891%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3EI%20have%20an%20application%20running%20on%20the%20NXP%20that%20communicates%20with%20a%20host%20application%20over%20uart%20flexcomm0.%20Working%20fine.%20What%20I%20want%20to%20implement%20is%20DFU%20(using%20mcumgr%20from%20the%20same%20host)%20but%20I%20only%20have%20this%20one%20single%20flexcomm0%20between%20the%20host%20and%20NXP.%20So%20custom%20commands%20and%20DFU%20need%20to%20go%20over%20the%20same%20flexcomm.%3C%2FP%3E%3CP%3EI%20found%20a%20post%20that%20says%20mcumgr%20can%20be%20on%20a%20shared%20uart%20by%20just%20adding%26nbsp%3B%3CSPAN%3ECONFIG_MCUMGR_TRANSPORT_SHELL%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3Ey%20to%20the%20prj.conf.%20But%20seems%20like%20it%20doesn't%20work.%20Tried%20all%20kinds%20of%20combinations%20but%20to%20no%20avail.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI'm%20talking%20about%20this%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ezephyr%2Cconsole%20%3D%20%26amp%3Bflexcomm0%3B%3CBR%20%2F%3Ezephyr%2Cshell-uart%20%3D%20%26amp%3Bflexcomm0%3B%3CBR%20%2F%3Ezephyr%2Cuart-mcumgr%20%3D%20%26amp%3Bflexcomm0%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EMy%20custom%20parser%20works%20fine%20until%20the%20point%20I%20enable%20the%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ECONFIG_MCUMGR%3C%2FSPAN%3E%3CSPAN%3E%3Dy%2C%20so%20I%20must%20be%20missing%20some%20config%20flags%20probably.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESo%20question%20is%3A%20can%20both%20be%20on%20the%20same%20port%3F%20If%20yes%2C%20what%20flags%20should%20be%20set%20(or%20not%20set)%20in%20the%20prj.conf%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%20in%20advance!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2205970%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5BLPC55S69%5D%20Zephyr%3A%20uart-mcumgr%20on%20shared%20flexcomm%20port%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2205970%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20Carlos%20for%20the%20feedback.%20The%20trick%20was%20to%20remove%20the%20shell-uart%20from%20the%20app.overlay%20file%20and%20keep%20the%20console%20and%20uart-mcumgr.%20In%20the%20prj.conf%26nbsp%3B%26nbsp%3B%3CSPAN%3Ereplace%26nbsp%3B%20the%20CONFIG_MCUMGR_TRANSPORT_UART%20by%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ECONFIG_MCUMGR_TRANSPORT_SHELL.%20I'm%20currently%20testing%20it%20but%20i%3CSPAN%3Et%20seems%20to%20work%20nicely...%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2205326%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5BLPC55S69%5D%20Zephyr%3A%20uart-mcumgr%20on%20shared%20flexcomm%20port%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2205326%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%2F227720%22%20target%3D%22_blank%22%3E%40ED8500%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EApologies%20the%20late%20reply%2C%3C%2FP%3E%0A%3CP%3EThe%26nbsp%3Blpcxpresso55s69%20has%20a%20DFU%20example%2C%20could%20you%20please%20try%20to%20add%20the%20same%20configurations%20to%20your%20project%3F%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22carlos_o_0-1763140349203.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22carlos_o_0-1763140349203.png%22%20style%3D%22width%3A%20368px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365741i4360EDAEFFADE532%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22carlos_o_0-1763140349203.png%22%20alt%3D%22carlos_o_0-1763140349203.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Ethe%20example%20overlay%20is%20to%20enable%20dfu%20permanent%20download%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E