cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link VCP on Nucleo-144 STM32F767ZI Configuration

MDS
Associate III
Posted on September 21, 2017 at 16:34

I am trying to use STM32CubeMX V4.22.1 with the F7 package V1.8.0 to configure USART3 which connects to the ST-Link VCP. Here are my issues:

1. Does the ST-Link processor autobaud to detect the USART3 configured speed?

2. Can I use any legal formatting line 8N1 No Parity? I have seen comments stating that for HyperTerminal one MUST use 7N1 Odd Parity. I am using TeraTerm that works with 8N1 No Parity. How does the ST-Link processor know my settings? ...Does it need to know?

3. I have UART4 working for another interface with DMA and I have no problems. When I attempt to enable DMA on USART3 I can add either Rx DMA (DMA1 Stream 1) or Tx DMA (DMA1 Stream 3), but not both. When I attempt to add the 2nd DMA mapping (either Rx or Tx) I get the following error when I click Add 'No Available DMA request for this peripheral'. These streams are only used for UART3. It is strange that I can add either Rx or Tx, but not both. I have successfully configured and used DMA for UART4 and UART5. I am setting up UART3 exactly the same.

4 REPLIES 4
Posted on September 21, 2017 at 17:20

1) No, both ends need to agree on format/speed. The system loader auto-bauds. If your app doesn't don't assume it will via osmosis.

2) Where? The system boot loader needs even parity, ST includes the parity in the bit length count 8E1 is 9-bits with even parity. Use 8N1 for most everything here, no confusion in terminal applications.

>>How does the ST-Link processor know my settings? ...Does it need to know?

The same way any USB serial dongle does, the OS sends configuration packets.

3) sorry haven't dug into that, but have use DMA on assorted STM32 USARTs without issues.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MDS
Associate III
Posted on September 21, 2017 at 19:27

I think I found the cause of item 3 - Cannot assign DMA to both USART3 Rx & Tx. It appears to be a limitation of STM32CubeMX V4.22.1 and maybe others. It appears that CubeMX only assigns 1 Channel to a Stream. I am using DMA with many peripherals including UART4 Tx & Rx, SPI2 Rx, and USART3 Tx & Rx. These require 5 DMA1 Channels. Looking at Table 27.DMA1 in the RM0410 Reference Manual, the DMA1 Streams causing the problem are DMA1 Stream1 and Stream3. The peripherals can be assigned as follows:

SPI2_Rx can use Stream 1 Channel 9 or Stream 3 Channel 0.

USART4 _Tx can only use Stream 4 Channel 4.

USART3_Rx can only use Stream 1 Channel 4.

USART3_Tx can use Stream 3 Channel 4 or Stream 4 Channel 7. 

Assuming my hypothesis is true:

a) USART4 _Tx  MUST use Stream 4

b) SPI2_Rx, USART3_Rx, and USART3_Tx must assign Channels on either Stream 1 or Stream 3 which would require assigning two Channels on one Stream.

Apparently CubeMX cannot do this. As I assign either USART3 Rx or Tx, SPI2_Rx jumps between Stream 1 and 3 preventing the other USART3 DMA from being assigned to a Stream in use.

This needs to be fixed! 

Posted on September 21, 2017 at 20:36

 ,

 ,

>,>,CubeMX only assigns 1 Channel to a Stream

No that's the hardware. Think channel multiplexed source ♯ , one source per stream, 8 streams, finite options

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MDS
Associate III
Posted on September 21, 2017 at 21:24

I am new with ARM. I have been in the PPC world for decades. So the lesson is... 'Pick your peripherals wisely. The SYM32F767 has lots of peripherals, but only a few at a time can use DMA.

Thanks.