DMA UART MKV56F not working

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

DMA UART MKV56F not working

Jump to solution
2,175 Views
maohuynh
Contributor II

Hi, 

I'm use UART2 DMA read data and Use Debug Console print data to terminal.

maohuynh_0-1713942288550.pngmaohuynh_1-1713942330880.png

Having that problem, my UART DMA is not working.
Can anyone show me the correct way to configure it when using it?
I'm use MCU expresso IDE

 

Tags (1)
0 Kudos
Reply
1 Solution
1,973 Views
maohuynh
Contributor II

Hi @Pablo_Ramos 

i think i found the problem, when i used tool MCUxpresso UART peripheral and UART component.

maohuynh_1-1715152259990.png

It doesn't allow me to use it at the same time peripheral and component. Here, the UART interrupt is called again, it is overlapped leading to an error.

maohuynh_2-1715152741101.png

I have to !define like the first picture for it to work. I think this is a bug, when I combine use shell, debug console and UART driver interrupt. 

View solution in original post

0 Kudos
Reply
5 Replies
2,127 Views
Pablo_Ramos
NXP Employee
NXP Employee

Hi @maohuynh 
There is a demo that you can take as reference in the SDK of twrkv58f, I know that is a different mcu but the configuration should be the same.

Pablo_Ramos_0-1714078408233.png
Hope it helps you!

 

0 Kudos
Reply
2,049 Views
maohuynh
Contributor II

maohuynh_0-1714623992578.png 

There is one more problem, It seems that The Peripherals tools are not working correctly, the same code, if using gen config tool, the code does not work.

I don't see any examples using it.

0 Kudos
Reply
1,989 Views
Pablo_Ramos
NXP Employee
NXP Employee

Hi @maohuynh 
There is no SDK example where they use shell and uarts simultaneously, but there are examples where they use it separately.

Pablo_Ramos_0-1715027597465.png

Also, in order to enable The Peripherals tools, you need to go to Config Tools -> Open Pins -> Enable Peripherals tools

Pablo_Ramos_1-1715027640467.pngPablo_Ramos_2-1715027645667.png

Hope it helps you!

0 Kudos
Reply
1,974 Views
maohuynh
Contributor II

Hi @Pablo_Ramos 

i think i found the problem, when i used tool MCUxpresso UART peripheral and UART component.

maohuynh_1-1715152259990.png

It doesn't allow me to use it at the same time peripheral and component. Here, the UART interrupt is called again, it is overlapped leading to an error.

maohuynh_2-1715152741101.png

I have to !define like the first picture for it to work. I think this is a bug, when I combine use shell, debug console and UART driver interrupt. 

0 Kudos
Reply
2,054 Views
maohuynh
Contributor II

Hi,

Thanks for the reply.

I solved the problem, but my error was related to the combination of Shell and Debug_console. When I use these 2 modules, It causes interrupts of all uarts. Is there any example config using Shell, Debug_console, and many uarts.

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1853190%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDMA%20UART%20MKV56F%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1853190%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20use%20UART2%20DMA%20read%20data%20and%20Use%20Debug%20Console%20print%20data%20to%20terminal.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22maohuynh_0-1713942288550.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22maohuynh_0-1713942288550.png%22%20style%3D%22width%3A%20338px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275479i2004D313FEA6B7B5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22maohuynh_0-1713942288550.png%22%20alt%3D%22maohuynh_0-1713942288550.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22maohuynh_1-1713942330880.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22maohuynh_1-1713942330880.png%22%20style%3D%22width%3A%20334px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275480i9E117E8792242030%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22maohuynh_1-1713942330880.png%22%20alt%3D%22maohuynh_1-1713942330880.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CSPAN%20class%3D%22%22%3EHaving%20that%20problem%2C%20my%20UART%20DMA%20is%20not%20working.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FPRE%3E%3CPRE%3E%3CSPAN%20class%3D%22%22%3ECan%20anyone%20show%20me%20the%20correct%20way%20to%20configure%20it%20when%20using%20it%3F%3C%2FSPAN%3E%3C%2FPRE%3E%3CPRE%3E%3CSPAN%20class%3D%22%22%3EI'm%20use%20MCU%20expresso%20IDE%3C%2FSPAN%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1861187%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20DMA%20UART%20MKV56F%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1861187%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%2F231808%22%20target%3D%22_blank%22%3E%40Pablo_Ramos%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20think%20i%20found%20the%20problem%2C%20when%20i%20used%20tool%20MCUxpresso%20UART%20peripheral%20and%20UART%20component.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22maohuynh_1-1715152259990.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22maohuynh_1-1715152259990.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277658iC550700D14A6AC35%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22maohuynh_1-1715152259990.png%22%20alt%3D%22maohuynh_1-1715152259990.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EIt%20doesn't%20allow%20me%20to%20use%20it%20at%20the%20same%20time%26nbsp%3Bperipheral%20and%20component.%20Here%2C%20the%20UART%20interrupt%20is%20called%20again%2C%20it%20is%20overlapped%20leading%20to%20an%20error.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22maohuynh_2-1715152741101.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22maohuynh_2-1715152741101.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277663iF1EA1CED73D04145%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22maohuynh_2-1715152741101.png%22%20alt%3D%22maohuynh_2-1715152741101.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20have%20to%20%3CSTRONG%3E!define%3C%2FSTRONG%3E%20like%20the%20first%20picture%20for%20it%20to%20work.%26nbsp%3BI%20think%20this%20is%20a%20%3CSTRONG%3Ebug%2C%20when%20I%20combine%20use%20shell%2C%20debug%20console%20and%20UART%20driver%20interrupt.%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1859955%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20DMA%20UART%20MKV56F%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1859955%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%2F214870%22%20target%3D%22_blank%22%3E%40maohuynh%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3EThere%20is%20no%20SDK%20example%20where%20they%20use%20shell%20and%20uarts%20simultaneously%2C%20but%20there%20are%20examples%20where%20they%20use%20it%20separately.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Pablo_Ramos_0-1715027597465.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Pablo_Ramos_0-1715027597465.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277303iC00F25201178B72C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Pablo_Ramos_0-1715027597465.png%22%20alt%3D%22Pablo_Ramos_0-1715027597465.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAlso%2C%20in%20order%20to%20enable%20The%20Peripherals%20tools%2C%20you%20need%20to%20go%20to%20Config%20Tools%20-%26gt%3B%20Open%20Pins%20-%26gt%3B%20Enable%20Peripherals%20tools%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Pablo_Ramos_1-1715027640467.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Pablo_Ramos_1-1715027640467.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277305i010987077C51C073%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Pablo_Ramos_1-1715027640467.png%22%20alt%3D%22Pablo_Ramos_1-1715027640467.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Pablo_Ramos_2-1715027645667.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Pablo_Ramos_2-1715027645667.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277306i5F9631D5C59AE5FE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Pablo_Ramos_2-1715027645667.png%22%20alt%3D%22Pablo_Ramos_2-1715027645667.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHope%20it%20helps%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1858176%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20DMA%20UART%20MKV56F%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1858176%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22maohuynh_0-1714623992578.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22maohuynh_0-1714623992578.png%22%20style%3D%22width%3A%20386px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276852i62B23962DD0588C2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22maohuynh_0-1714623992578.png%22%20alt%3D%22maohuynh_0-1714623992578.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20is%20one%20more%20problem%2C%20It%20seems%20that%20The%20Peripherals%20tools%20are%20not%20working%20correctly%2C%20the%20same%20code%2C%20if%20using%20gen%20config%20tool%2C%20the%20code%20does%20not%20work.%3C%2FP%3E%3CP%3EI%20don't%20see%20any%20examples%20using%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1858174%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20DMA%20UART%20MKV56F%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1858174%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EThanks%20for%20the%20reply.%3C%2FP%3E%3CP%3EI%20solved%20the%20problem%2C%20but%20my%20error%20was%20related%20to%20the%20combination%20of%20Shell%20and%20Debug_console.%20When%20I%20use%20these%202%20modules%2C%20It%20causes%20interrupts%20of%20all%20uarts.%20Is%20there%20any%20example%20config%20using%20Shell%2C%20Debug_console%2C%20and%20many%20uarts.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1855098%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20DMA%20UART%20MKV56F%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1855098%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%2F214870%22%20target%3D%22_blank%22%3E%40maohuynh%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3EThere%20is%20a%20demo%20that%20you%20can%20take%20as%20reference%20in%20the%20SDK%20of%20twrkv58f%2C%20I%20know%20that%20is%20a%20different%20mcu%20but%20the%20configuration%20should%20be%20the%20same.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Pablo_Ramos_0-1714078408233.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Pablo_Ramos_0-1714078408233.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275959i7151EAA3914946F5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Pablo_Ramos_0-1714078408233.png%22%20alt%3D%22Pablo_Ramos_0-1714078408233.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3EHope%20it%20helps%20you!%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E