Hi there,
This may be helpful,
Here’s a clear explanation to help with the use of UART on the A603 board (which is based on the Bouffalo Lab BL602/BL604 SoC):
Getting Started with UART on A603 (BL602/BL604)
The A603 board has built-in support for UART (Universal Asynchronous Receiver/Transmitter) and it’s typically used for debugging, communication with sensors, or sending data to another microcontroller or computer.
Default UART Pins on A603
Function | Pin on A603 | GPIO |
---|---|---|
UART TX | Pin 10 | GPIO 14 (UART0_TXD) |
UART RX | Pin 11 | GPIO 15 (UART0_RXD) |
- These are the default UART0 pins used for both programming and serial debugging.
BL602 SDK / Dev Framework Options
You can use one of the following to work with UART on A603:
1. Arduino (if supported by your firmware fork)
- Use
Serial.begin(115200);
,Serial.print()
andSerial.read()
just like with ESP32 or STM32.
2. BL602 IoT SDK (Official from Bouffalo Lab)
Use the standard bl_uart_*
functions.
3. BL602 IoT SDK with FreeRTOS or Rust SDK (alternative)
Sample UART Code (C with IoT SDK)
#include <bl_uart.h>
#include <blog.h>
#include <stdio.h>
#include <string.h>
void main()
{
const char *msg = "Hello from A603 via UART!\r\n";
bl_uart_init(0, 115200, 8, 1, 0, 0); // UART0, 115200 baud
while (1) {
bl_uart_data_send(0, (uint8_t *)msg, strlen(msg));
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}
How to Receive UART Data
char buffer[64];
int len = bl_uart_data_recv(0, (uint8_t *)buffer, sizeof(buffer));
if (len > 0) {
buffer[len] = '\0';
printf("Received: %s\n", buffer);
}
Toolchains & Flashing
- Use blflash to flash the firmware to A603.
- USB-to-UART cable connects directly to TX/RX.
- For logging, use a terminal like
minicom
,PuTTY
, orscreen
at115200 baud
.
Notes
- If using UART1 or UART2, you may need to manually configure pinmux in the BL602 GPIO system.
- Make sure no conflict with boot/flash mode pins (GPIO8/9). Straping /Boot pins.
- Check the WiKi for additional Info.
HTH
GL PJ