[EN] Arduino: SoftwareSerial with STM32F030F4

From the article recommending the use of the board STM32F030F4P6 that uses serial communication with the use of additional libraries that do not have enough memory. So we try to use SoftwareSerial of Arduino framework and use pins PA10 and PA9 to connect to RX and TX of USB-RS232 Converter Module as shown in Figure 1 and try to use it according to the settings of Arduino IDE as shown in Figure 2 and order toggle LED connected to pin PA4 found that when compiling the sample program is used, the ROM and RAM usage are 80% and 21% respectively as reported by the Arduino IDE as follows.

Sketch uses 13188 bytes (80%) of program storage space. Maximum is 16384 bytes.
Global variables use 876 bytes (21%) of dynamic memory, leaving 3220 bytes for local variables. Maximum is 4096 bytes.
Figure 1 STM32F030F4P6 with CH340E module
Read More

[TH] Arduino: ใช้ SoftwareSerial กับ STM32F030F4

จากบทความแนะนำการใช้บอร์ด STM32F030F4P6 ที่ใช้การสื่อสารพอร์ตอนุกรมด้วยการใช้ไลบรารีเพิ่มเติมซึ่งทำให้ปริมาณหน่วยความจำไม่มากพอสำหรับใช้งาน ทางเราเลยลองเปลี่ยนมาใช้ SoftwareSerial ของเฟรมเวิร์ก Arduino และใช้ขา PA10 และ PA9 ต่อเข้ากับ RX และ TX ของโมดูลแปลง USB-RS232 ดังภาพที่ 1 และทดลองใช้งานตามการตั้งค่าของ Arduino IDE ดังภาพที่ 2 พร้อมทั้งสั่ง Toggle หลอด LED ที่เชื่อมต่อกับขา PA4 พบว่า เมื่อคอมไพล์โปรแกรมตัวอย่างแล้วมีการใช้ ใช้หน่วยความจำ ROM และ RAM เป็น 80% และ 21% ตามลำดับดังการรายงานจาก Arduino IDE ดังต่อไปนี้

Sketch uses 13188 bytes (80%) of program storage space. Maximum is 16384 bytes.
Global variables use 876 bytes (21%) of dynamic memory, leaving 3220 bytes for local variables. Maximum is 4096 bytes.
ภาพที่ 1 บอร์ด STM32F030F4P6 กับโมดูล CH340E
Read More