Everything seems to be properly setup as I can actually see output from the UART.
The issue is with the content. The content is supposed to be different on each output.
I have a TX buffer that is loaded with wathever I want to output. I'm using SWO output to double check that the buffer content is the expected.
Code: Select all
uartStartSend(&UARTD6, length, (uint8_t*)txRingBuffer);
The buffer pointer is always the same, length varies.
With the above here's an example of the output:
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1001 hello from nanoFramework
1021 hello from nanoFramework
1021 hello from nanoFramework
1021 hello from nanoFramework
1021 hello from nanoFramework
If I add this before the above call:
Code: Select all
uartStartSend(&UARTD6, 2, "\r\n");
this is what I get on the output:
1001 hello from nanoFramework
1003 hello from nanoFramework
1004 hello from nanoFramework
1004 hello from nanoFramework
1004 hello from nanoFramework
1004 hello from nanoFramework
1008 hello from nanoFramework
1008 hello from nanoFramework
1008 hello from nanoFramework
1011 hello from nanoFramework
1012 hello from nanoFramework
1013 hello from nanoFramework
1014 hello from nanoFramework
1015 hello from nanoFramework
1015 hello from nanoFramework
1015 hello from nanoFramework
1018 hello from nanoFramework
1019 hello from nanoFramework
1019 hello from nanoFramework
1019 hello from nanoFramework
1022 hello from nanoFramework
From the look of it, it seems that the DMA transaction is not actually started or updated and the same content is tx over and over.
When changing the pointer and content (by adding that dummy CR+LF on a fixed string) the DMA is "updated" almost everytime.
Could it be that something is missing in the DMA setup that is not making what's supposed to (resetting? restarting?) when the pointer (and/or) pointer + length are exactly the same has they were on the previous call?