2024-08-13 06:48 AM
Greetings,
I have STM32Cube IDE installed, created some test apps, blinking LED's, RTOS threads, mutex and so on,
writing on UART2 (virtual serial) is working well as I have working output on virtual COM port using putty on serial.
I want to access UART3 as I have ESP-01S board connected on CN4 but no success.
For the test I have removed ESP-01S and connected USB-RS232 (3.3V) RX/TX pins on CN4, opened another putty on this serial port to see output but whatever I send to it, nothing happens on putty.
In test thread I'm doing this:
void WifiTask(void const * argument)
{
uint8_t buffer[64]={0};
int len;
for(;;)
{
len = sprintf((char *)buffer, "AT+GMR\x0d\x0a");
HAL_UART_Transmit(&huart3, buffer, len, HAL_MAX_DELAY);
osDelay(100);
}
}
But nothing comes out. I have changed all possible combinations of GPIO mode and GPIO Pull up/dn, but serial port is silent as hill.
Is there any hint on what should I do to proper initialize this USART3 port?
As I said, USART2 is working as it should but seen on PC as virtual COM port trough USB connected Dev board.
Best regards,
Robert
Solved! Go to Solution.
2024-08-14 05:59 AM
"I was looking in the STM32L4P5-IO.pdf and STM32L4P5-DK.pdf manuals and there is no mention that the board default to SPI."
I understand that this information is missing from user manual.
The schematics of all STM32 boards are available in two clicks, and I consider them to be an important complement daily resource for any hardware development (in your case, connecting an ESP8266 in UART mode), in the same way as the Reference manual and the product datasheet.
Best regards,
Romain
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-08-14 02:39 AM
Greetings, here are the updates:
I've switched from USART3 (on STMod+ daughter board) to the LPUART1 (onboard CN14 D0/D1) and set up to 1152008N1 and it worked.
I've even connected USB-RS232 on the same TX/RX lines so I can spy what STM32L4..DK and WRL-17146 are talking together.
So the question stays the same, why USART3 on STMod+ is not working, and what shell I do to make it working as on this daughter board is dedicated port for ESP-01S and fits perfectly.
Here's the image of testing environment.
In the WifiTask thread I'm initializing the ESP01S with AT-RST -> reset and ATE1 -> more details
and in the loop AT+GMR -> get firmware info and as shown it's working.
Brg,
Robert
2024-08-14 03:33 AM
Hello @RobertGrizilo
Did you check STM32L4P5G-DK schematic in page 12
https://www.st.com/resource/en/schematic_pack/mb1535-l4p5g-b02-schematic.pdf
STMOD+ CN1 (below) is hardware configured in SPI mode on pin 1 to 4 (NSS, MOSI, MISO & SCK) by SB3 to SB6.
You should:
Open SB7, solder SB1 to wire STMOD_USART3_TX.
Open SB8, solder SB2 to wire STMOD_USART3_RX
Let me know ?
Best regards
Romain,
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-08-14 04:07 AM
Thanks, that make sense.
I was looking in the STM32L4P5-IO.pdf and STM32L4P5-DK.pdf manuals and there is no mention that the board default to SPI.
I saw STmod+ CN1 connector and CN4 connector which said it's for ESP-01S WiFi board so I assumed it's in normal RS232
Ok, I will not modify the board as I don't wan to have is modified and LPUART1 is working fine.
Thanks, It would be nice to have this info in the manual, It would reduce head scratches.
2024-08-14 05:59 AM
"I was looking in the STM32L4P5-IO.pdf and STM32L4P5-DK.pdf manuals and there is no mention that the board default to SPI."
I understand that this information is missing from user manual.
The schematics of all STM32 boards are available in two clicks, and I consider them to be an important complement daily resource for any hardware development (in your case, connecting an ESP8266 in UART mode), in the same way as the Reference manual and the product datasheet.
Best regards,
Romain
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.