cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0 UART on b-l072z-lrwan1

MMath.10
Associate II

Hi,

I use the b-l072z-lrwan1 to make lora advertisment and it's work.

I use the project AT_slave or END_Node.

But i want to use the second uart USART1 and nothing work in the environment.

If i just change the file B-L072Z-LRWAN1\Applications\LoRa\End_Node\Core\inc\mlm32l0xx_hw_conf

The program launch but nothing appear on the UART.

I make a project with 2 UART with STM32CubeMX and both work great (it's not a hardware problem)

Someone could help me?

1 ACCEPTED SOLUTION

Accepted Solutions

USART1 is REQUEST 3, Channel 2 or 4, check also hard references in VCOM.C

/* Definition for USARTx's DMA */
#define USARTx_TX_DMA_CHANNEL             DMA1_Channel7
 
/* Definition for USARTx's DMA Request */
#define USARTx_TX_DMA_REQUEST             DMA_REQUEST_4

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

18 REPLIES 18

USART1 is REQUEST 3, Channel 2 or 4, check also hard references in VCOM.C

/* Definition for USARTx's DMA */
#define USARTx_TX_DMA_CHANNEL             DMA1_Channel7
 
/* Definition for USARTx's DMA Request */
#define USARTx_TX_DMA_REQUEST             DMA_REQUEST_4

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thanks for your reply.

Do you have a link to a doc wich explain these configuration?

What i want is USART1 in standard output

In a second time i want USART2 in TXRX mode without DMA.

USART1 work with channel 4 but not with channel 2

"

/* Definition for USARTx's DMA */

#define USARTx_TX_DMA_CHANNEL       DMA1_Channel4

"

MMath.10
Associate II

Thanks for the first correction,

So now, I want my USART1 to work again.

I modify only vcom.c.

"

 //status = HAL_UART_Init(&UartHandle1);

"

If i do not init my USART, everything works, otherwise only the first message appear on USART2.

Any idea?

Up for this question

@Community member​ 

Do you prefer that I open a new subject?

Try pulling the Reference Manual for the L072 part.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

One person with interrelated topics, best kept in single thread.​

Many hours behind you, will check later.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I read these document :

DocID027100 rev 4 STM32L072x8 STM32L072xBSTM32L072xZ

DocID029205 rev 1 UM2052 User manual

And the big one DocID025942 Rev 8 RM0377 Reference manual

But i don't find a lot of documentation about L072 USART...

I donwload eveything on murata about the chip.

But they don't talk about USART.

https://my.murata.com/en/web/lrwan_abz/moduleinfo

I read a lot here :

https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-discovery-kits/b-l072z-lrwan1.html

But i think 2 USART is more a basic problem and i found no detail here.

Any idea?

@Community member​  I have open a ST support case 00071475.

Regards.